Map Remote-Markers Datasource using Razor Pages

3 posts, 1 answers
  1. John
    John avatar
    12 posts
    Member since:
    May 2016

    Posted 14 Dec 2017 Link to this post

    Hi,

    In the absence of a dedicated spot for map questions I'll just post my question here:

    If we look at the example code take from here:

    @(Html.Kendo().Map().Name("map").Center(30.268107, -97.744821).Zoom(15).Layers(layers =>{         layers.Add().Type(MapLayerType.Tile).UrlTemplate("http://tile2.opencyclemap.org/transport/#= zoom #/#= x #/#= y #.png").Subdomains("a", "b", "c").Attribution("&copy; <a href='http://osm.org/copyright'>OpenStreetMap contributors</a>." +"Tiles courtesy of <a href='http://www.opencyclemap.org/'>Andy Allan</a>");         layers.Add().Type(MapLayerType.Marker).DataSource(dataSource => dataSource
                      .Read(read => read.Action("_StoreLocations", "Map"))).LocationField("LatLng").TitleField("Name");}))

     

    My question is this - in the scenario of using Core Razor Pages we do not have a Controller Action as such.

    Could I please if it is possible have a modified sample like the one above except to show using data-source using the new Razor Pages model?

    Thanks for your time,

    John

  2. Answer
    Stefan
    Admin
    Stefan avatar
    3067 posts

    Posted 19 Dec 2017 Link to this post

    Hello, John,

    As the controllers are replaced this will require using handlers and a custom dataSource transport in order to call the current URL:

    https://docs.telerik.com/aspnet-mvc/getting-started/custom-datasource#custom-datatype-crud-operations-setup

    http://www.talkingdotnet.com/handle-ajax-requests-in-asp-net-core-razor-pages/

    I also made the example using the Razor pages approach.

    I hope this is helpful.

    Regards,
    Stefan
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. John
    John avatar
    12 posts
    Member since:
    May 2016

    Posted 19 Dec 2017 in reply to Stefan Link to this post

    Thanks once again Stefan,  will be in touch in the new year with an order :-)
Back to Top