:) OK. Unfortunately your book is not available yet, so I have to remain 
dumb for the rest of my life...

You didn't mention this in this post, probably because "chapter 8" 
wasn't ready that time ? :)

<snip>

I'll try to keep this post both factual and helpful!

1.) SQL Server uses "...a modified view of the GML 3.1.1 schema
restricted and adopted to the portions supported by Microsoft SQL
Server for geometry types". As you have find out, you can't directly
import this into Google Maps. You can view the actual schema used
here: http://schemas.microsoft.com/sqlserver/profiles/gml/

2.) There are, however, several ways to take spatial data from SQL
Server 2008 and output them on Google Maps (or Virtual Earth, or
Google Earth).
  - You can use XSLT to style GML to KML or GeoRSS, that can be
imported by the GGeoXml method.
  - You can use a PHP / C# / VB handler to manually create the
javascript constructor from WKT (or WKB or GML), and then execute them
using eval() in an AJAX-style script.
  - You can use the native SqlGeometryBuilder / SqlGeographyBuilder
classes contained in Microsoft.SqlServerTypes.dll in a .NET handler to
construct KML/GeoRSS.

You can see examples of 1.) and 2.) in my new book "Beginning Spatial
with SQL Server 2008" (http://www.apress.com/book/view/9781430218296).
And if you want to see an example of 3.), you can check out the
associated website:
http://www.beginningspatial.com/creating_3d_prism_maps_using_google_earth.
This uses a .NET handler to execute a SQL Server 2008 stored
procedure, generate KML from the output, and then pass that to a
network link in Google Earth (but you could pass that to Google Maps
or Virtual Earth just as easily).

As previously noted, if you do go use any sort of handler to
dynamically create GeoRSS/KML to pass to Google, that handler MUST
reside on a publicly-accessible website, since the data must be passed
to Google's servers and processed before it is rendered on the map. If
you want to use locally-held data, you might want to consider the
equivalent VEShapeLayer() method in Virtual Earth instead, which can

be processed locally.

</snip>

tanoshimi schrieb:
> GeoRSS direct from SQL Server 2008 works fine for me.... SQL Server
> outputs the GML - all you need to do is include the additional
> elements in the SELECT statement to constuct a GeoRSS feed including
> that output. You can do this direct in one SQL Server query - no need
> for XSLT or manual 'pimping'! Discussed in detail in Chapter 8 of
> "Beginning Spatial" - http://www.apress.com/book/view/9781430218296
>
> On Jan 13, 11:30 pm, "Neil.Young" <[email protected]> wrote:
>   
>> tanoshimi schrieb:> Rather than generate KML, you can export data from SQL 
>> Server in
>>     
>>> GeoRSS/GML format and import that directly into Google Maps instead.
>>>       
>> Doesn't work. I think we've already discussed this in a thread named "Is
>> this valid input for GGeoXml()"? At least some sort of "pimping" is
>> required, either by XSLT or hand made KML generation.
>>
>>
>>
>> - Hide quoted text -
>>
>> - Show quoted text -
>>     
> >
>
>   

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to