Demonstration of MapGuide Open Source and Google Maps Integration


Please zoom in closely (zoom scale of 17 and below) to our demonstration data area within the purple box to view parcel centroids. To zoom, double-click on the map or use the slider. To pan, click on the map and drag. You can click on parcel centroids to view information about that parcel, now including Spokane County photos for most parcels that have a structure. You can also view WMS layers streamed from a MapGuide Open Source Server. Zoom in to 15 or below to turn on the Parcels layer. Scroll to the bottom of this page for a more detailed description of how this application was developed.

Feedback Pane

MapGuide Layers
Parcels
Municipalities



This site combines datasources derived from a MapGuide Open Source (MGOS) Server and Google Maps. First, WMS layers streamed directly from a MapGuide Open Source Server can be overlain on a standard Google Map. In this application, this was done with the help of some code written by Brian Flood et al. that constructs a standard WMS call when using Google Maps custom tiled layers (GTileLayer). More information on this can be found on Brian's blog. We recently switched this site to use the new GTileLayerOverlay objects for the WMS layers instead of having to define custom map types. This was introduced with API v2.62 and is a much nicer solution.

Second, the MGOS API was used to dynamically stream Google Map marker points whenever the map view changes. Custom ASP.NET (C#) code was written to take the bounding box of the current Google Map view, use that as the basis for a spatial overlay query against the parcel datasource, and then extract the parcel centroids lat and lon. The complete XML marker file is then constructed from this and any related attribute information which is what you see in the information window in Google Maps when you click on one of these points. The client-side JavaScript that uses the Google Maps events was written with help from the Google Maps API Tutorial and the Google Maps API discussion group.



Andy Morsell, P.E.
Owner
Spatial Integrators, Inc.