using arcgis server web map services in web map mash-ups

10
©2010 AIR WORLDWIDE 1 Using ArcGIS Server Web Map Services in Web Map Mash- Ups Benjamin Spaulding, Ph.D. AIR Worldwide Esri Boston Dev Meet-Up 12/8/2010

Upload: alissa

Post on 22-Feb-2016

53 views

Category:

Documents


0 download

DESCRIPTION

Using ArcGIS Server Web Map Services in Web Map Mash-Ups. Benjamin Spaulding, Ph.D. AIR Worldwide Esri Boston Dev Meet-Up 12/8/2010. What is a WMS?. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Using  ArcGIS  Server Web Map Services in Web Map Mash-Ups

©2010 AIR WORLDWIDE 1

Using ArcGIS Server Web Map Services in Web Map Mash-UpsBenjamin Spaulding, Ph.D.AIR Worldwide

Esri Boston Dev Meet-Up12/8/2010

Page 2: Using  ArcGIS  Server Web Map Services in Web Map Mash-Ups

©2010 AIR WORLDWIDE 2

What is a WMS?

• “The OpenGIS® 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

Page 3: Using  ArcGIS  Server Web Map Services in Web Map Mash-Ups

©2010 AIR WORLDWIDE 3

Integrating ArcGIS Server WMS

• Creating Data– Simply generate a map in ArcMap with

data stored in ArcServer– Publish the map to ArcServer 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

Page 4: Using  ArcGIS  Server Web Map Services in Web Map Mash-Ups

©2010 AIR WORLDWIDE 4

Understanding the WMS URL

•How to decode a WMS URL–Request – GetMap–Layer – What is the layer’s name?

• In ArcGIS 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://rsarcserver1/ArcGIS/services/topos_wms/MapServer/WMSServer?request=GetMap&transparent=true&format=image%2Fjpeg&bgcolor=ffffff&version=1.1.1&layers=0&styles=default&exceptions=application%2Fvnd.ogc.se_xml&bbox=-71.148%2C42.2595%2C-71.003%2C42.4045&srs=EPSG%3A4326&width=700&height=700

Page 5: Using  ArcGIS  Server Web Map Services in Web Map Mash-Ups

©2010 AIR WORLDWIDE 5

ArcGIS Server in Google Maps V3

• WMS layer added as a ImageMapType

• 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

Page 6: Using  ArcGIS  Server Web Map Services in Web Map Mash-Ups

©2010 AIR WORLDWIDE 6

ArcGIS Server WMS in Esri JavaScript

• 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

Page 7: Using  ArcGIS  Server Web Map Services in Web Map Mash-Ups

©2010 AIR WORLDWIDE 7

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

Page 8: Using  ArcGIS  Server Web Map Services in Web Map Mash-Ups

©2010 AIR WORLDWIDE 8

Quick Example

Page 9: Using  ArcGIS  Server Web Map Services in Web Map Mash-Ups

©2010 AIR WORLDWIDE 9

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 JavaScript library

• Can rapidly create WMS layers in ArcMap and ArcGIS Server so others (developers) can easily consume data in web applications

Page 10: Using  ArcGIS  Server Web Map Services in Web Map Mash-Ups

©2010 AIR WORLDWIDE 10

For More Information

• Main example• www.gisdoctor.com/v3_wms.html

• Another great example• http://maps.massgis.state.ma.us/mhc/examples/gmap3wms_exa

mple2.html

• Integrating Esri platform into Google Maps• http://help.arcgis.com/EN/webapi/javascript/gmaps/index.html

• WMS in Esri JavaScript v2.1• http://help.arcgis.com/EN/webapi/javascript/arcgis/help/jssample

s_start.htm