Solved

Plot multiple markers on google maps with spatial data

Posted on 2011-03-14
1
1,215 Views
Last Modified: 2012-05-11
Dear Experts,

I have a table holding spatial data in SQL 2008.  I would like to be able to plot this data onto a google map.  The data is returned via a recordset using classic ASP.

Can anyone point me in the right direction.

Thanks
0
Comment
Question by:grantballantyne
1 Comment
 
LVL 6

Accepted Solution

by:
worthyking1 earned 500 total points
ID: 35209605
When you say "spatial data" do you mean Lat/Long coordinates?

If you don't want anything fancy, just a static Google Map (without zoom etc.) then just use this URL to embed it:

http://maps.google.com/maps/api/staticmap?center=Brooklyn+Bridge,New+York,NY&zoom=14&size=512x512&maptype=roadmap
&markers=color:blue%7Clabel:A%7C40.702147,-74.015794&markers=color:green%7Clabel:B%7C40.711614,-74.012318
&markers=color:red%7Ccolor:red%7Clabel:C%7C40.718217,-73.998284&sensor=false

The above example is centered on the brooklyn bridge with three different color markers. Add as many markers as you want with the URL Param 'marker' like so:

&markers=color:blue%7Clabel:A%7C40.702147,-74.015794

For dynamic Javascript maps you can check out more in-depth methods here:

http://code.google.com/apis/maps/documentation/javascript/tutorial.html
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now