MVC 4 and Google Maps API v3

前端 未结 4 739
再見小時候
再見小時候 2021-02-06 08:52

I\'m incorporating Google Maps into my MVC 4 application. Fairly straightforward to do. However, I have a question concerning the best way to add multiple markers dynamically. M

4条回答
  •  长发绾君心
    2021-02-06 09:27

    Use the web API and handle it all asynchronously. Pass a JSON object back to the client, parse out your info, remove your old markers and add the new ones.

    EDIT after your comment:

    If you post some of what you've tried and not been able to get to work then we can help you with the problems you're running into. If you're just getting started:

    http://www.asp.net/web-api - Great tutorials on using the Web API http://angularjs.org/ - Check out Angular for the GET request (http://docs.angularjs.org/api/ng.$http) and binding your results to the UI

提交回复
热议问题