MVC Map - what is the right structure of remote data?

2 posts, 1 answers
  1. Steffen
    Steffen avatar
    2 posts
    Member since:
    Jul 2009

    Posted 21 Jun 2018 Link to this post

    On this site: get us a nice example of using remote data in a map.

    In this provided method you return a json file. How is this structured? I connot find any example.

    public ActionResult _StoreLocations()
                return Json(MapDataRepository.StoreLocations());
  2. Answer
    Georgi avatar
    684 posts

    Posted 22 Jun 2018 Link to this post

    Hi Steffen,

    The response from the server is an array of objects. Each object contains two fields:
    •  Name - a string which represents the name of the marker
    • LatLang - an array of two numbers which represents the coordinates, one for latitude and another for longitude.


        LatLng: [30.2675, -97.7409],
        Name: "Zevo Toys"
    }, {
        LatLng: [30.2707, -97.749],
        Name: "Foo Bars"

    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.
Back to Top