Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Maps - Easy way in ASP.Net?

I'm wanting to use google maps and see a million ways to do it on the web. Some are javascript methods and some are asp.net server components with which I have hit and miss luck. What's the easiest and most reliable way using c# and asp.net?

I have my location data including geocodes in a database. I want to provide users a method to do a lookup for certain locations. From there, my code will provide a table of geocodes to google maps with markers on the map corresponding to the found entries. Users can see each entry and need to be able to tell which is which if multiple rows are returned.

Is there a good way to do this?

like image 568
Bill Avatar asked Dec 11 '08 19:12

Bill


3 Answers

The Google Maps API is accessed via JavaScript (any server controls are just abstracting this away from you). In the case you described, you would need to dynamically output the required JavaScript to tell the maps API what to display.

See http://dotnet.sys-con.com/node/171162

like image 146
John Sheehan Avatar answered Sep 20 '22 10:09

John Sheehan


There are a few server controls to do it, like this, but you have to learn how to do things in one way (server control) or another (Javascript Google API).

I recommend using the Google API, since it has more samples all over the web, and you can use new features implemented by Google right after they release them and don't have to wait for the server control developer to do it.

like image 34
Eduardo Molteni Avatar answered Sep 21 '22 10:09

Eduardo Molteni


I would recommend using direct JavaScript to create the Google Maps. It's fairly straight forward and then you will be able to understand what's going on behind the scenes.

Google has some pretty good tutorials and documentation to get you up and running quick. Once you add one to your site, it will become very easy to setup the rest of the customization that you need.

Take a look at this site for examples.

http://code.google.com/apis/maps/documentation/examples/

like image 35
Ryan Smith Avatar answered Sep 20 '22 10:09

Ryan Smith