SQL Spatial Database with Google Map

995 views
Skip to first unread message

Phil Arbeau

unread,
Apr 17, 2012, 9:55:56 AM4/17/12
to google-map...@googlegroups.com
Hello,

I currently have a SQL Server database with geographic data, one table representing area polygons, with the second table representing events as points.

I was curious if it would be possible to upload this to a Google Map, and allow the user to select a polygon and then query the summary stats of the events that fall within that polygon.

Thanks in advance,

Phil

Alan Smith

unread,
Apr 17, 2012, 5:38:06 PM4/17/12
to google-map...@googlegroups.com

You'll have to get your database onto your web server and write some PHP to query it with parameters supplied by your users from a web page then manipulate the results into calls to Maps to display the features.


--
You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-maps-js-api-v3/-/KfOdTFHlpOIJ.
To post to this group, send email to google-map...@googlegroups.com.
To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Mr.Pohoda

unread,
Apr 18, 2012, 2:49:49 AM4/18/12
to google-map...@googlegroups.com
I prefer StarTraX's answer but you can also try Fusion Tables which allows you to query for data.

Dne úterý, 17. dubna 2012 15:55:56 UTC+2 Phil Arbeau napsal(a):

en4ce

unread,
Apr 18, 2012, 9:28:12 AM4/18/12
to google-map...@googlegroups.com
like that!


Am Dienstag, 17. April 2012 23:38:06 UTC+2 schrieb StarTraX:

You'll have to get your database onto your web server and write some PHP to query it with parameters supplied by your users from a web page then manipulate the results into calls to Maps to display the features.
On Tue, Apr 17, 2012 at 11:55 PM, Phil Arbeau <par...@gmail.com> wrote:
Hello,

I currently have a SQL Server database with geographic data, one table representing area polygons, with the second table representing events as points.

I was curious if it would be possible to upload this to a Google Map, and allow the user to select a polygon and then query the summary stats of the events that fall within that polygon.

Thanks in advance,

Phil

--
You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-maps-js-api-v3/-/KfOdTFHlpOIJ.
To post to this group, send email to google-maps-js-api-v3@googlegroups.com.
To unsubscribe from this group, send email to google-maps-js-api-v3+unsub...@googlegroups.com.

Phil Arbeau

unread,
Apr 19, 2012, 10:17:22 AM4/19/12
to google-map...@googlegroups.com
Thank you for the reply. I'm kind of new to the web-side of things so I'm trying to wrap my head around this. Would I upload initially just put my database on a webserver (like using a computer as the server,  a or hosting service?).

Also curious if a tool like SQL Server to KML would be of help at all?

I'm not familiar with PHP, but I am able to code fairly proficiently, would you perhaps also be able to point me towards which commands I would need to query the data and display it on a map interface?

Thank you very much,

Phil


On Tuesday, 17 April 2012 17:38:06 UTC-4, StarTraX wrote:

You'll have to get your database onto your web server and write some PHP to query it with parameters supplied by your users from a web page then manipulate the results into calls to Maps to display the features.
On Tue, Apr 17, 2012 at 11:55 PM, Phil Arbeau <par...@gmail.com> wrote:
Hello,

I currently have a SQL Server database with geographic data, one table representing area polygons, with the second table representing events as points.

I was curious if it would be possible to upload this to a Google Map, and allow the user to select a polygon and then query the summary stats of the events that fall within that polygon.

Thanks in advance,

Phil

--
You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-maps-js-api-v3/-/KfOdTFHlpOIJ.
To post to this group, send email to google-maps-js-api-v3@googlegroups.com.
To unsubscribe from this group, send email to google-maps-js-api-v3+unsub...@googlegroups.com.

Alan Smith

unread,
Apr 20, 2012, 5:46:07 PM4/20/12
to google-map...@googlegroups.com
Unless you're hosting your own web server, in which case you could use a JDB connection to your database,which I guess isn't the case, you'll have to re-create your database in mySQL or something similar on the server, and build a system to keep it in sync with your SQLServer database.
And no, I don't think you'll get much joy from SQL Server to KML.
The PHP code to access a mySQL database can be found by googling those terms -  like we all do to learn new techniques.
Displaying the data in a Map interface will achieved by javascript calls to the Maps API. Ditto my comments above.
Now it's time for you to get your hands dirty by building your own capability here. 
Good luck, it's very rewarding!



To view this discussion on the web visit https://groups.google.com/d/msg/google-maps-js-api-v3/-/nG5ndznfN4AJ.

To post to this group, send email to google-map...@googlegroups.com.
To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com.

Alan Smith

unread,
Apr 20, 2012, 6:16:21 PM4/20/12
to google-map...@googlegroups.com
Correction: ODBC, not JDB.

Phil Arbeau

unread,
Apr 23, 2012, 5:27:31 PM4/23/12
to google-map...@googlegroups.com
Thank you for the informative reply!
Reply all
Reply to author
Forward
0 new messages