1 google earth powered by mapguide. 2© 2006 autodesk session outline mapguide / google earth...

16
1 Google Earth Powered by MapGuide

Upload: gloria-storer

Post on 11-Dec-2015

227 views

Category:

Documents


0 download

TRANSCRIPT

1

Google EarthPowered by MapGuide

2© 2006 Autodesk

Session Outline

• MapGuide / Google Earth Integration Overview

• Demo

• How it Works and How to Use It

3© 2006 Autodesk

MapGuide Components

DatabaseServer

Web Serverand

MapGuideWeb ServerExtensions

MapGuideServer

`

Google Earth

MapGuideAJAX Viewer

MapGuideWeb Studio

`

MapGuideDWF Viewer

Web TierClient Tier Server TierT

hic

k C

lien

tT

hin

Clie

nt

4© 2006 Autodesk

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:

1. Content can be delivered using Google Earth to a wider audience

2. Provides new ways to visualize data in the context of Google’s world

3. MapGuide is the application engine, Google Earth is the user interface and supplier of base map content

5© 2006 Autodesk

OverviewGoogle Earth Servers

Google Earth Servers

MapGuide Server – Queries DatabaseMapGuide Server – Queries Database

Overlay maps delivered by MapGuide as KML/KMZOverlay maps delivered by MapGuide as KML/KMZ

Streams base map data over WebStreams base map data over Web

Google Earth Client, overlays MapGuide layers on top of Base Map data. Google earth acts as a client to MapGuide

Google Earth Client, overlays MapGuide layers on top of Base Map data. Google earth acts as a client to MapGuide

Data – privately maintained and owned Data – privately maintained and owned

SHP, SDF, PostGIS, Oracle, ArcSDE, SQL Server, etc.

6© 2006 Autodesk

Demo…

7© 2006 Autodesk

Google Earth Integration Flow

Web Request to MapGuide

Web Request to MapGuide

Web Request to MapGuide

1.Using MapGuide Open Source – built in functions

2.Using Custom application – using PHP, .NET, or Java

8© 2006 Autodesk

Google Earth Integration Flow

Web Request to MapGuide

Web Request to MapGuide

Query Data SourceQuery Data Source

Query to Data Source

1.Custom FDO based queries to data source

2.Built in spatial and analysis capability

3.Any FDO supported data source e.g. SHP, SDF, PostGIS, Oracle, ArcSDE, SQL Server, etc.

9© 2006 Autodesk

Web Request to MapGuide

Web Request to MapGuide

Query Data SourceQuery Data Source

Generate KML/KMZ file

Generate KML/KMZ file

Generate KML/KMZ file

1.Generate data in 2D or 3D

2.Include custom tooltips

Google Earth Integration Flow

10© 2006 Autodesk

Google Earth Integration Flow

Web Request to MapGuide

Web Request to MapGuide

Query Data SourceQuery Data Source

Display on Google Earth

Display on Google Earth

Generate KML/KMZ file

Generate KML/KMZ file

Display on Google Earth

1.Rendered as an overlay

2.2D or 3D depending on KML/KMZ data

11© 2006 Autodesk

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.

Returns a KML document containing one Network Link per layer in the Map Definition.

12© 2006 Autodesk

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.

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.

13© 2006 Autodesk

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.

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.

14© 2006 Autodesk

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>

RelativeToGroundOrAbsolute

One of: Millimeters, Centimeters, Meters, Kilometers, Inches, Feet, Yards, Miles, or Points

15© 2006 Autodesk

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

a.Sample data set

b.PHP sample code

It is straight forward to modify the sample code to use your own datasets.

16© 2006 Autodesk

Q & A

[email protected]