170 likes | 474 Views
Google Earth. Powered by MapGuide. Session Outline. MapGuide / Google Earth Integration Overview Demo How it Works and How to Use It. MapGuide Components. Why integrate with Google Earth?. Benefits of Google Earth Google Earth ~ 250,000,000 Downloads!
E N D
Google Earth Powered by MapGuide
Session Outline • MapGuide / Google Earth Integration Overview • Demo • How it Works and How to Use It
Why integrate with Google Earth? Benefits of Google Earth • Google Earth ~ 250,000,000 Downloads! • Google has raised the bar with regards to interfaces to Maps With a MapGuide / Google Earth Integration: • Content can be delivered using Google Earth to a wider audience • Provides new ways to visualize data in the context of Google’s world • MapGuide is the application engine, Google Earth is the user interface and supplier of base map content
Overview Data – privately maintained and owned SHP, SDF, PostGIS, Oracle, ArcSDE, SQL Server, etc. Google Earth Servers MapGuide Server – Queries Database Streams base map data over Web Overlay maps delivered by MapGuide as KML/KMZ Google Earth Client, overlays MapGuide layers on top of Base Map data. Google earth acts as a client to MapGuide
Google Earth Integration Flow Web Request to MapGuide • Web Request to MapGuide • Using MapGuide Open Source – built in functions • Using Custom application – using PHP, .NET, or Java
Google Earth Integration Flow Web Request to MapGuide • Query to Data Source • Custom FDO based queries to data source • Built in spatial and analysis capability • Any FDO supported data source e.g. SHP, SDF, PostGIS, Oracle, ArcSDE, SQL Server, etc. Query Data Source
Google Earth Integration Flow Web Request to MapGuide • Generate KML/KMZ file • Generate data in 2D or 3D • Include custom tooltips Query Data Source Generate KML/KMZ file
Google Earth Integration Flow Web Request to MapGuide • Display on Google Earth • Rendered as an overlay • 2D or 3D depending on KML/KMZ data Query Data Source Generate KML/KMZ file Display on Google Earth
MapGuide: Network Request CGI APIs The GetMapKml Operation: http://myserver.com/mapguide/mapagent/mapagent.exe? OPERATION = GetMapKml& VERSION = 1.0.0 & USERNAME = Anonymous & Password = & MAPDEFINITION = Library://MyMap.MapDefinition & FORMAT = [KML, KMZ or XML] Returns a KML document containing one Network Link per layer in the Map Definition.
MapGuide: Network Request CGI APIs The GetLayerKml Operation: http://myserver.com/mapguide/mapagent/mapagent.exe? OPERATION = GetLayerKml& VERSION = 1.0.0 & USERNAME = Anonymous & Password = & LAYERDEFINITION = Library://MyLayer.LayerDefinition & DPI = <the resolution of the display used by the caller> (defaults to 96) & FORMAT = [KML, KMZ or XML] & BBOX = <minx,miny,maxx,maxy> & WIDTH = <the current map width in pixels> & HEIGHT = <the current map height in pixels> Returns a KML document containing a <NetworkLink> element corresponding to each scale range supported by the layer that is currently visible. <Region> elements are used to instruct Google Earth only to request data via these links when the current scale falls within the scale range and when the current map extent intersects the extent of the data.
MapGuide: Network Request CGI APIs The GetFeaturesKml Operation: http://myserver.com/mapguide/mapagent/mapagent.exe? OPERATION = GetLayerKml& VERSION = 1.0.0 & USERNAME = Anonymous & Password = & LAYERDEFINITION = Library://MyLayer.LayerDefinition & DPI = <the resolution of the display used by the caller> (defaults to 96) & FORMAT = [KML, KMZ or XML] & BBOX = <minx,miny,maxx,maxy> & WIDTH = <the current map width in pixels> & HEIGHT = <the current map height in pixels> GetFeaturesKml returns the actual content to be rendered on the map. For feature layers, a KML document is returned that contains the features represented in vector format, plus style information such as the color, line width etc. For raster layers, the raster image is returned in PNG format.
Supporting Extrusion Extrusion can be enabled for a LayerDefinition by specifiying an <ElevationSettings> element within <VectorScaleRange> elements. <ElevationSettings> <ZOffset>0</ZOffset> <ZExtrusion>HEIGHT_AGL</ZExtrusion> <ZOffsetType>RelativeToGround</ZOffsetType> <Unit>Meters</Unit> </ElevationSettings> RelativeToGround Or Absolute One of: Millimeters, Centimeters, Meters, Kilometers, Inches, Feet, Yards, Miles, or Points
Sample Code for the Do It Yourselfer Sample code for dynamically generating KML using the API is available for download from: http://mapguide.osgeo.org/livegallery.html The sample code includes • Sample data set • PHP sample code It is straight forward to modify the sample code to use your own datasets.
Q & A robert.bray@autodesk.com