简体   繁体   中英

Displaying Markers on a Google Map in a Visual Studio Website

I am using Visual Studio to create a website (Website project) that will allow a user to view a set of markers on a Google Map. I basically have a global static list of 'marker' objects, and each marker object has fields for the name, latitude, longitude, etc... I followed this tutorial ( https://developers.google.com/maps/documentation/javascript/tutorial#HelloWorld ) which taught me how to include the map in the webpage, and then I also followed a second tutorial ( https://developers.google.com/maps/documentation/javascript/examples/map-projection-simple ) which taught me how to add multiple markers to the map.

As I understand it, to include the map in the webpage, I was required to write a section of code in JavaScript. How can I have the map plot markers according to the data stored in my list (which is all coded in C#)?

Appreciate the help!

Adrian.

Why not just use the C# to load a local version of the HTML / Javascript you need in a WebBrowser component? And utilize a js function to read the markers from a txt file of some sorts.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM