Web Mapping Seth Peery, Senior GIS Architect Virginia Tech Geospatial Information Sciences FDI April...

23
Web Mapping Seth Peery, Senior GIS Architect Virginia Tech Geospatial Information Sciences FDI April 16, 2012

Transcript of Web Mapping Seth Peery, Senior GIS Architect Virginia Tech Geospatial Information Sciences FDI April...

Page 1: Web Mapping Seth Peery, Senior GIS Architect Virginia Tech Geospatial Information Sciences FDI April 16, 2012.

Web Mapping

Seth Peery, Senior GIS Architect

Virginia Tech Geospatial Information Sciences

FDIApril 16, 2012

Page 2: Web Mapping Seth Peery, Senior GIS Architect Virginia Tech Geospatial Information Sciences FDI April 16, 2012.

Objective: Understand how web maps work, what goes on behind the scenes, and how to actually deploy them in production IT environments

• Common architectural features of web mapping applications

• Web Mapping Workflows• Examples from Google Maps and ArcGIS Server

Page 3: Web Mapping Seth Peery, Senior GIS Architect Virginia Tech Geospatial Information Sciences FDI April 16, 2012.

Database:

(DBAA team,Central IT)

Physical Storage

(Systems support,Central IT)

Map Presentation

Map Services

Web Applications

Web Browser Clients

SAN / NAS

GPRD OracleInstance

MXDs

ArcGISServer Map

Service

Middleware:

(Enterprise GIS team,Central IT)

ArcSDE

GIS Mapping Clients

SQL Clients

Banner data

CNS data

Facilites Data

Research Data

Facilites Data

Web Mapping vs. Supporting GIS components

Data Management

Cartography

Web MappingYou are here.

Page 4: Web Mapping Seth Peery, Senior GIS Architect Virginia Tech Geospatial Information Sciences FDI April 16, 2012.

Physical Storage

Database

Map Presentation

Map Services

Web Application Logic

Web Application Presentation

Users

Local Storage SAN / NAS

Oracle MySQL ArcSDE

MXDsCustom

Symbology

ArcGISServer Map

ServiceWMS

3rd partybasemap

ArcGISServer built-in

renderinglogic

PHPreflectors

Javascript

PHP CSS JSP ASP.NET

Java .NET

Web Mapping Application

Software Architecture

This layer consists of web content that’s not the web application – look and feel, formatting, etc.

This layer addresses the functionality of your application – e.g., what happens when the user clicks?

This layer concerns the transport of data from its source format, with the appropriate presentation., to the web application.

This layer concerns map symbology. It is more of a workflow item than a subsystem – it may be handled in the source data or the map svc.

Everything from here down is data

Page 5: Web Mapping Seth Peery, Senior GIS Architect Virginia Tech Geospatial Information Sciences FDI April 16, 2012.

Functional Components ofAll Web Mapping Applications

• Source data • Data accessible to the web app

– Basemap (increasingly coming from third party services)– Thematic layers (your data)

• Representation/symbology of the data• Web service to return thematic data• Web map object and application logic• Web application container/interface for the map

(presentation)

Page 6: Web Mapping Seth Peery, Senior GIS Architect Virginia Tech Geospatial Information Sciences FDI April 16, 2012.

ArcGIS Server Web ADF/API Architecture

DatabaseArcSDE

Physical Storage

Map Presentation

Map Services

Web Application Logic

Web Application Presentation

Users

SAN / NAS

Oracle

MXDs

ArcGISServer Map

Service

Javascript

CSS JSP ASP.NET

Java .NET

Web Mapping Application

Page 7: Web Mapping Seth Peery, Senior GIS Architect Virginia Tech Geospatial Information Sciences FDI April 16, 2012.

Google Maps Architecture

Physical Storage

Database

Map Presentation

Map Services

Web Application Logic

Web Application Presentation

Users

SAN / NAS

MySQL

CustomSymbology

Google BaseMap

PHPreflectors

Javascript

PHP CSS

Web Mapping Application

Google

Page 8: Web Mapping Seth Peery, Senior GIS Architect Virginia Tech Geospatial Information Sciences FDI April 16, 2012.

Database:

(DBAA team,Central IT)

Physical Storage

(Systems support,Central IT)

Map Presentation

Map Services

Web Applications

Web Browser Clients

SAN / NAS

GPRD OracleInstance

MXDs

ArcGISServer Map

Service

Middleware:

(Enterprise GIS team,Central IT)

ArcSDE

GIS Mapping Clients

SQL Clients

Banner data

CNS data

Facilites Data

Research Data

Facilites Data

ArcGIS Server in the Scheme of Things

ArcGIS Server doesn't care about anything below this point, so you can plug and play with different supported data sources... filesystem vs ArcSDE, etc.

At web applications tier, we can choose between the {Java | .NET} ADF, the JavaScript API, Flex API, Silverlight API

SOC/SOM (GIS Server Components) respond to requests for maps and return data or images (e.g., MapService, WMS)

Page 9: Web Mapping Seth Peery, Senior GIS Architect Virginia Tech Geospatial Information Sciences FDI April 16, 2012.

ArcGIS Server Deployment WorkflowESRI says “Author, Publish, Use”… the details are a bit more complex!

• Identify source data

• Identify server platform

• Move source data to a location visible to the server (e.g., ArcSDE, file GDB on server)

• Make an MXD with data source references to “production” copy of data

• Upload MXD to server or ensure it is visible in a shared location

• Author a Map Service based on the MXD, set capabilities

• Create a web application that consumes the service• Web API (Flex/SilverLight/JavaScript)

• Web ADF (Deprecated)

• Customize web application

• Publish to Production environment

Page 10: Web Mapping Seth Peery, Senior GIS Architect Virginia Tech Geospatial Information Sciences FDI April 16, 2012.

ESRI Developer Resources• Main ArcGIS Server Resource Center:

http://resources.arcgis.com/content/arcgisserver/10.0/about

• Flex API Reference:http://help.arcgis.com/en/webapi/flex/apiref/index.html

• JavaScript API Reference:http://help.arcgis.com/en/webapi/flex/apiref/index.html

Page 11: Web Mapping Seth Peery, Senior GIS Architect Virginia Tech Geospatial Information Sciences FDI April 16, 2012.

Initial SetupAssemble data, make a map and make sure the server can access it

Page 12: Web Mapping Seth Peery, Senior GIS Architect Virginia Tech Geospatial Information Sciences FDI April 16, 2012.

Publish the map as a service

Page 13: Web Mapping Seth Peery, Senior GIS Architect Virginia Tech Geospatial Information Sciences FDI April 16, 2012.

REST Services DirectoryThe map we created in ArcMap is now available as a REST endpoint and can be accessed via the REST services directory by a web mapping application.

http://training.gis.vt.edu/arcgis/rest/services

Page 14: Web Mapping Seth Peery, Senior GIS Architect Virginia Tech Geospatial Information Sciences FDI April 16, 2012.

Web Service representations of the mapREST SOAP

Page 15: Web Mapping Seth Peery, Senior GIS Architect Virginia Tech Geospatial Information Sciences FDI April 16, 2012.

REST preview• Web Services have

no UI – they’re meant to be used by computer programs

• The REST services directory provides a minimal preview web application for human viewers

• We’re not done yet – this is not a “real” web application.

http://training.gis.vt.edu/arcgis/rest/services/samples/BlacksburgRCL/MapServer

Page 16: Web Mapping Seth Peery, Senior GIS Architect Virginia Tech Geospatial Information Sciences FDI April 16, 2012.

Sample Flex Viewer

• SFV is a configurable web mapping application from http://resources.arcgis.com

• The app is a Flash-based viewer that can be modified (to an extent) via a set of XML files

http://help.arcgis.com/en/webapps/flexviewer/index.html

Page 17: Web Mapping Seth Peery, Senior GIS Architect Virginia Tech Geospatial Information Sciences FDI April 16, 2012.

Flex Viewer Example

http://training.gis.vt.edu/geog5984/sampleflex/

Page 18: Web Mapping Seth Peery, Senior GIS Architect Virginia Tech Geospatial Information Sciences FDI April 16, 2012.

FlexViewer Source

http://training.gis.vt.edu/geog5984/sampleflex/config.xml

Page 19: Web Mapping Seth Peery, Senior GIS Architect Virginia Tech Geospatial Information Sciences FDI April 16, 2012.

ArcGIS Server JavaScript Viewer Example: Blacksburg RCL over ESRI terrain

http://training.gis.vt.edu/geog5984/samplejs/example2.htm

Page 20: Web Mapping Seth Peery, Senior GIS Architect Virginia Tech Geospatial Information Sciences FDI April 16, 2012.

ArcGIS Server JavaScript Viewer Example 2: Google Maps Extension

http://training.gis.vt.edu/geog5984/samplejs/example3.htm

Page 21: Web Mapping Seth Peery, Senior GIS Architect Virginia Tech Geospatial Information Sciences FDI April 16, 2012.

Google Maps Deployment Workflow• No need to worry about the basemap!• Identify a web server (no special capabilities needed)• For Gmaps v2, obtain an API key (omit in APIv3)• Identify source data, copy to server (or load into DB)• Write page logic to render map and symbology• Design web front-end

Google Maps API Reference is found at

https://developers.google.com/maps/

Page 22: Web Mapping Seth Peery, Senior GIS Architect Virginia Tech Geospatial Information Sciences FDI April 16, 2012.

Google Maps ExamplesFor all the examples below, refer to the ViewSource for code

comments, which provide detailed explanation of each feature.

1) Basic Google Map of VT Campushttp://training.gis.vt.edu/geog5984/gmaps/gmaps_example1.htm

2) Basic Map with place name searchhttp://training.gis.vt.edu/geog5984/gmaps/gmaps_example2.htm

3) All of the above, plus VT Buildingshttp://training.gis.vt.edu/geog5984/gmaps/gmaps_example3.htm

4) All of the above, plus icon stylinghttp://training.gis.vt.edu/geog5984/gmaps/gmaps_example4.htm

Page 23: Web Mapping Seth Peery, Senior GIS Architect Virginia Tech Geospatial Information Sciences FDI April 16, 2012.

Contact Information

Seth PeerySenior GIS Architect, Enterprise GISVirginia Tech Geospatial Information Sciences

2060 Torgersen Hall (0197) Blacksburg, VA 24061(540) [email protected] http://gis.vt.edu