This is a migrated thread and some comments may be shown as answers.

Map Remote-Markers Datasource using Razor Pages

2 Answers 141 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 14 Dec 2017, 11:38 PM

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 Answers, 1 is accepted

Sort by
0
Accepted
Stefan
Telerik team
answered on 19 Dec 2017, 09:53 AM
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.
0
John
Top achievements
Rank 1
answered on 19 Dec 2017, 10:53 AM
Thanks once again Stefan,  will be in touch in the new year with an order :-)
Tags
General Discussions
Asked by
John
Top achievements
Rank 1
Answers by
Stefan
Telerik team
John
Top achievements
Rank 1
Share this question
or