Using Arc GIS Server Web Map Services in
Using Arc. GIS Server Web Map Services in Web Map Mash-Ups Benjamin Spaulding, Ph. D. AIR Worldwide Esri Boston Dev Meet-Up 12/8/2010 © 2010 AIR WORLDWIDE 1
What is a WMS? • “The Open. GIS® Web Map Service Interface Standard (WMS) provides a simple HTTP interface for requesting geo-registered map images from one or more distributed geospatial databases. ” • A WMS request defines the geographic layer(s) and area of interest to be processed. – From http: //www. opengeospatial. org/standards/wms • Simple definition - Provides a link to a geospatial image © 2010 AIR WORLDWIDE 2
Integrating Arc. GIS Server WMS • Creating Data – Simply generate a map in Arc. Map with data stored in Arc. Server – Publish the map to Arc. Server and make sure to select WMS under the Capabilities tab • Accessing from a Web Platform – Will need access to a WMS URL – Need an API to integrate with online mapping tools – Tons of online examples, easy to program © 2010 AIR WORLDWIDE 3
Understanding the WMS URL • How to decode a WMS URL –Request – Get. Map –Layer – What is the layer’s name? • In Arc. GIS Server the layer name is a number from 0 to n. Check metadata for details –Style – Is there a defined style for the layer? –Format – Do you want to display a JPEG or a PNG? –Bounding Box – How do you pass those values to the URL? –Projection – ESPG: 4326 or others –Width and Height of tile – 256 x 256 or other size? –Version – 1. 1. 1 or 1. 3? • Complete WMS URL Request: http: //rsarcserver 1/Arc. GIS/services/topos_wms/Map. Server/WMSServer? request=Get. Map&trans parent=true&format=image%2 Fjpeg&bgcolor=ffffff&version=1. 1. 1&layers=0&styles=default&exce ptions=application%2 Fvnd. ogc. se_xml&bbox=-71. 148%2 C 42. 2595%2 C 71. 003%2 C 42. 4045&srs=EPSG%3 A 4326&width=700&height=700 © 2010 AIR WORLDWIDE 4
Arc. GIS Server in Google Maps V 3 • WMS layer added as a Image. Map. Type • When creating the function that reads the WMS URL the developer can define a number of properties • Bounding box values passed using Google’s code • Developer can take advantage of Google’s built in tools, like using the address search, or adding KML overlays © 2010 AIR WORLDWIDE 5
Arc. GIS Server WMS in Esri Java. Script • WMS layer added as an URL • When creating the function that reads the WMS URL the developer can define a number of properties • Developers can take advantage of built in tools, including WMS legends and other Esri tools © 2010 AIR WORLDWIDE 6
Catches… • Need to understand your version – Differences between 1. 1. 1 and 1. 3 – Bounding box values, axis order based on CRS – SRS (projection) vs. CRS (coordinate system) • Projections – What is the goal of the map? – ESPG: 4326, most compatible, other projections are available, but more code is required • Image Format – Remember, there are differences between PNG and JPEG rendering • When using Google Maps you will need to sign up for an API © 2010 AIR WORLDWIDE 7
Quick Example © 2010 AIR WORLDWIDE 8
Summary • WMS is a great tool for displaying a variety of datasets in a number of web applications • Can create your own base maps and take advantage of other tools available in the appropriate Java. Script library • Can rapidly create WMS layers in Arc. Map and Arc. GIS Server so others (developers) can easily consume data in web applications © 2010 AIR WORLDWIDE 9
For More Information • Main example • www. gisdoctor. com/v 3_wms. html • Another great example • http: //maps. massgis. state. ma. us/mhc/examples/gmap 3 wms_exa mple 2. html • Integrating Esri platform into Google Maps • http: //help. arcgis. com/EN/webapi/javascript/gmaps/index. html • WMS in Esri Java. Script v 2. 1 • http: //help. arcgis. com/EN/webapi/javascript/arcgis/help/jssampl es_start. htm © 2010 AIR WORLDWIDE 10
- Slides: 10