Upload
others
View
7
Download
0
Embed Size (px)
Citation preview
Building Building MashupsMashups Using the ArcGIS Using the ArcGIS Web APIsWeb APIs
Heather GonzagoHeather GonzagoGarima VyasGarima VyasGarima VyasGarima Vyas
AgendaAgendagg
•• Overview: Web MapsOverview: Web MapsOverview: Web MapsOverview: Web Maps•• Overview: ArcGIS API for RESTOverview: ArcGIS API for REST•• ArcGIS API for JavaScriptArcGIS API for JavaScriptpp
––Google Maps ExtensionGoogle Maps Extension––Bing Maps ExtensionBing Maps Extension
•• ArcGIS API for FlexArcGIS API for Flex•• ArcGIS API for SilverlightArcGIS API for Silverlight•• QuestionsQuestions
Share Geographic ContentShare Geographic Content Web GISWeb GISgg
ArcGIS ServerArcGIS Server
A GIS E lA GIS E l
Web GISWeb GIS
ArcGIS DesktopArcGIS Desktop
ArcGIS ExplorerArcGIS Explorer
Desktop GISDesktop GIS
ArcGIS OnlineArcGIS Online Mobile GISMobile GIS
Author Publish Use
Evolution of maps on the WebEvolution of maps on the Web
WebWeb
GIS on theGIS on the
Web Web Maps 2.0Maps 2.0
Purpose-built mapsReusable tasks
Accomplish specific
Searchable Searchable Web MapsWeb Maps
GIS on the GIS on the WebWeb
p ptasks
Elaborate toolsFor GIS users
Consumer mapsStatic Web Static Web
MapsMaps
Consumer mapsSpatial searches
Spatial exploration
Web MapsWeb Maps
•• Application accessed via a browser over a networkApplication accessed via a browser over a network•• Contains an interactive map componentContains an interactive map componentp pp p•• Consumes one or more Web servicesConsumes one or more Web services•• Solves specific business problemsSolves specific business problems
Why Web maps are usefulWhy Web maps are usefulyy
•• Use GIS without knowing GIS.Use GIS without knowing GIS.–– Simple applications access powerful functionalitySimple applications access powerful functionality–– Simple applications access powerful functionality.Simple applications access powerful functionality.–– Gain spatial insight into business problems.Gain spatial insight into business problems.
•• Use GIS without installing GIS.Use GIS without installing GIS.GIS functionality accessed in a Web browserGIS functionality accessed in a Web browser–– GIS functionality accessed in a Web browser.GIS functionality accessed in a Web browser.
–– GIS resources reside on multiple Web servers.GIS resources reside on multiple Web servers.
MashupsMashups
•• Courtesy of Wikipedia Courtesy of Wikipedia –– In Web development, a In Web development, a mashupmashup is a Web application that is a Web application that
combines data from more than one source into a singlecombines data from more than one source into a singlecombines data from more than one source into a single combines data from more than one source into a single integrated tool.integrated tool.
Other Web ClientsOther Web Clients ArcGIS OnlineArcGIS OnlineOpenLayersOpenLayers
ArcGIS OnlineArcGIS Online
GIS UserGIS UserArcGIS ServerArcGIS Server
MashupMashup
Google MapsGoogle MapsBi MBi MBing MapsBing Maps
Getting Started Getting Started -- Help/ResourcesHelp/Resourcesgg pp
•• ArcGIS Resource CenterArcGIS Resource Center
AgendaAgendagg
•• Overview: Web MapsOverview: Web MapsOverview: Web MapsOverview: Web Maps•• Overview: ArcGIS API for RESTOverview: ArcGIS API for REST•• ArcGIS API for JavaScriptArcGIS API for JavaScriptpp
––Google Maps ExtensionGoogle Maps Extension––Bing Maps ExtensionBing Maps Extension
•• ArcGIS API for FlexArcGIS API for Flex•• ArcGIS API for SilverlightArcGIS API for Silverlight•• QuestionsQuestions
ArcGIS Server REST APIArcGIS Server REST APIArcGIS Server REST APIArcGIS Server REST API•• Service DirectoryService Directory
–– A simple view of your ArcGIS Server (A simple view of your ArcGIS Server (exampleexample))
•• All GIS services are exposed as resources.All GIS services are exposed as resources.–– ServiceService--level metadatalevel metadata
•• Resources have operations.Resources have operations.–– Map Service (export, find, identify)Map Service (export, find, identify)–– Map Service Layers (query)Map Service Layers (query)–– Image Services (export)Image Services (export)–– GeocodeGeocode Service (find address candidates, reverse Service (find address candidates, reverse geocodegeocode))
GeoprocessingGeoprocessing (execute submit job)(execute submit job)–– GeoprocessingGeoprocessing (execute, submit job)(execute, submit job)–– Geometry Service (project, simplify, buffer, and othersGeometry Service (project, simplify, buffer, and others* [where * [where
does this asterisk point to?]does this asterisk point to?]))–– Network Service (solve route)Network Service (solve route)( )( )
ArcGIS Server Web APIsArcGIS Server Web APIs
•• ArcGIS Services ArcGIS Services d id i REST APIREST API
Rich Internet ApplicationsRich Internet Applicationsconsumed viaconsumed via REST APIREST API
•• Reusable services Reusable services •• Development environment Development environment
JavaScript API
FlexAPI
SilverlightAPI
of your choiceof your choice
REST
ArcGIS ServerArcGIS Server
ArcGIS Server Web APIsArcGIS Server Web APIs
•• MappingMapping––Layers (tiled, dynamic, custom)Layers (tiled, dynamic, custom)––Graphics Graphics ––Map navigationMap navigation––Map navigation Map navigation
•• TasksTasks––Query Task (Map Server Layer)Query Task (Map Server Layer)
((GG S )S )––Locator (Locator (GeocodeGeocode Server)Server)––Find Task (Map Server)Find Task (Map Server)–– Identify Task (Map Server)Identify Task (Map Server)––Geometry ServiceGeometry Service––Geoprocessor (GP Server)Geoprocessor (GP Server)––Route Task (NA Server)Route Task (NA Server)Route Task (NA Server)Route Task (NA Server)
Creating Web mapsCreating Web mapsg pg p2. Publish resources
to ArcGIS Server.5. Run Web application.
ArcGIS ServerArcGIS Server
1. Author GIS resources.
3. Browse REST Services
Directory.
4. Write 4. Write code/referencing code/referencing
published service.published service.
AgendaAgendagg
•• Overview: Web MapsOverview: Web MapsOverview: Web MapsOverview: Web Maps•• Overview: ArcGIS API for RESTOverview: ArcGIS API for REST•• ArcGIS ArcGIS API for JavaScriptAPI for JavaScriptpp
––Google Maps ExtensionGoogle Maps Extension––Bing Maps ExtensionBing Maps Extension
•• ArcGIS API for FlexArcGIS API for Flex•• ArcGIS API for SilverlightArcGIS API for Silverlight•• QuestionsQuestions
JavaScript APIJavaScript APIWhat is the API?What is the API?
•• Collection of JavaScript classesCollection of JavaScript classes•• Pure client development; runs in the browserPure client development; runs in the browser•• All browsers know how to read it.All browsers know how to read it.•• Stable wellStable well--developed languagedeveloped language•• Stable, wellStable, well--developed languagedeveloped language•• Built on the Dojo Toolkit (framework)Built on the Dojo Toolkit (framework)
–– Open sourceOpen sourceOutOut ofof thethe box rich UI widgetsbox rich UI widgets–– OutOut--ofof--thethe--box rich UI widgetsbox rich UI widgets
–– Eliminates most browser differencesEliminates most browser differences•• Two extensionsTwo extensions
J S i t E t i t th G l M APIJ S i t E t i t th G l M API–– JavaScript Extension to the Google Maps APIJavaScript Extension to the Google Maps API–– JavaScript Extension to Bing Maps (formerly Virtual Earth)JavaScript Extension to Bing Maps (formerly Virtual Earth)
ArcGIS API for JavaScriptArcGIS API for JavaScriptDevelopment EnvironmentDevelopment Environment
•• Markup language: HTMLMarkup language: HTML•• Scripting language: JavaScriptScripting language: JavaScript•• API hosted by ArcGIS OnlineAPI hosted by ArcGIS Online
–– Available for local hostingAvailable for local hostingAvailable for local hostingAvailable for local hosting•• Develop applications in any text Develop applications in any text
editoreditor–– NotepadNotepad–– NotepadNotepad–– AptanaAptana StudioStudio–– Visual StudioVisual Studio
•• No downloads or plugNo downloads or plug insins•• No downloads or plugNo downloads or plug--ins ins requiredrequired
ArcGIS API for JavaScript ExtensionsArcGIS API for JavaScript ExtensionsGoogle Maps, Bing MapsGoogle Maps, Bing Maps
•• Alternate APIs that utilize Google and Bing Maps Alternate APIs that utilize Google and Bing Maps basemapsbasemaps combined with ArcGIS Server contentcombined with ArcGIS Server content
•• Same task functionality as the regular JavaScript APISame task functionality as the regular JavaScript API•• Use WGS 1984 Web Mercator projection (Use WGS 1984 Web Mercator projection (wkidwkid 102113)102113)Use WGS 1984 Web Mercator projection (Use WGS 1984 Web Mercator projection (wkidwkid 102113)102113)•• Cached map services need to use Google/Bing tiling Cached map services need to use Google/Bing tiling
schemescheme•• Google MapsGoogle Maps•• Google MapsGoogle Maps
–– Different default map navigationDifferent default map navigation–– Requires Google API Key (free)Requires Google API Key (free)
•• Bing MapsBing Maps•• Bing MapsBing Maps–– Requires Bing Requires Bing MapControlMapControl–– Only allows cached maps, no dynamic mapsOnly allows cached maps, no dynamic maps
ArcGIS API for JavaScriptArcGIS API for JavaScriptppSample ApplicationSample Application
•• IncludedIncluded–– MapMap–– ExtentExtent–– Tiled LayerTiled Layeryy–– Dynamic LayerDynamic Layer
JavaScript TasksJavaScript TasksppFind and IdentifyFind and Identify
•• FindFind–– Find with Data Grid (Find with Data Grid (samplesample))
Id tifId tif•• IdentifyIdentify–– Identify Features (Identify Features (samplesample))
ArcGIS API for JavaScriptArcGIS API for JavaScriptppMashup ExampleMashup Example
•• Summit MapSummit Map (2009 ESRI (2009 ESRI MashupMashup Challenge winner) Challenge winner)
AgendaAgendagg
•• Overview: Web MapsOverview: Web MapsOverview: Web MapsOverview: Web Maps•• Overview: ArcGIS API for RESTOverview: ArcGIS API for REST•• ArcGIS API for JavaScriptArcGIS API for JavaScriptpp
––Google Maps ExtensionGoogle Maps Extension––Bing Maps ExtensionBing Maps Extension
•• ArcGIS API for FlexArcGIS API for Flex•• ArcGIS API for SilverlightArcGIS API for Silverlight•• QuestionsQuestions
ArcGIS API for FlexArcGIS API for FlexWhat is the API?What is the API?
•• What is Flex? A highly productive, free, andWhat is Flex? A highly productive, free, andWhat is Flex? A highly productive, free, and What is Flex? A highly productive, free, and open source framework for building expressive open source framework for building expressive Web applicationsWeb applications
•• Create rich Internet applications on top of Create rich Internet applications on top of ArcGIS ServerArcGIS Server
•• Applications run in Flash Player plugApplications run in Flash Player plug inin•• Applications run in Flash Player plugApplications run in Flash Player plug--in in through the browser or in Adobe AIR.through the browser or in Adobe AIR.
•• PlugPlug--in allows applications to look and act the in allows applications to look and act the gg ppppsame across browsers.same across browsers.
ArcGIS API for FlexArcGIS API for FlexDevelopment EnvironmentDevelopment Environment
•• Markup language: MXMLMarkup language: MXML•• Scripting language: Scripting language:
ActionScriptActionScript•• ArcGIS API for Flex:ArcGIS API for Flex:ArcGIS API for Flex: ArcGIS API for Flex:
Download at the Download at the Flex Flex Resource CenterResource Center and add and add as a library to the as a library to the application.application.
•• Applications built in Flex Applications built in Flex Builder 3 standBuilder 3 stand--alone alone program or as an Eclipse program or as an Eclipse plugplug--inin
•• Applications compile as aApplications compile as aSWF fileSWF file
ArcGIS API for FlexArcGIS API for FlexSample ApplicationSample Application
•• IncludedIncluded–– MapMap–– ExtentExtent–– Tiled LayerTiled Layeryy–– Dynamic LayerDynamic Layer
Flex TasksFlex TasksGeoprocessingGeoprocessing and Routingand Routing
•• GeoprocessingGeoprocessing–– Drive Times (Drive Times (samplesample))
R tiR ti•• RoutingRouting–– Routing around Barriers (Routing around Barriers (samplesample))
ArcGIS API for FlexArcGIS API for FlexMashup ExampleMashup Example
•• DTSAgile Exec DTSAgile Exec MashupMashup ((2010 ESRI 2010 ESRI MashupMashup Challenge winnerChallenge winner))
AgendaAgendagg
•• Overview: Web MapsOverview: Web MapsOverview: Web MapsOverview: Web Maps•• Overview: ArcGIS API for RESTOverview: ArcGIS API for REST•• ArcGIS API for JavaScriptArcGIS API for JavaScriptpp
––Google Maps ExtensionGoogle Maps Extension––Bing Maps ExtensionBing Maps Extension
•• ArcGIS API for FlexArcGIS API for Flex•• ArcGIS API for SilverlightArcGIS API for Silverlight•• QuestionsQuestions
ArcGIS API for ArcGIS API for SilverlightSilverlightggWhat is the API?What is the API?
•• Create rich Internet applications on top ofCreate rich Internet applications on top ofCreate rich Internet applications on top of Create rich Internet applications on top of ArcGIS Server.ArcGIS Server.
•• Integrates multimedia, graphics, animations, Integrates multimedia, graphics, animations, and interactivity into a single runtime and interactivity into a single runtime environmentenvironment
•• Based on the Microsoft Silverlight frameworkBased on the Microsoft Silverlight framework•• Based on the Microsoft Silverlight frameworkBased on the Microsoft Silverlight framework•• Applications run in Silverlight Player plugApplications run in Silverlight Player plug--in.in.•• PlugPlug--in allows applications to function andin allows applications to function andPlugPlug in allows applications to function and in allows applications to function and
look the same in any browser.look the same in any browser.
ArcGIS API for ArcGIS API for SilverlightSilverlightggDevelopment EnvironmentDevelopment Environment
•• Markup language: XAMLMarkup language: XAML•• Scripting language: Visual Scripting language: Visual
Basic .NET/C#Basic .NET/C#•• ArcGIS librariesArcGIS librariesArcGIS libraries ArcGIS libraries
downloaded from downloaded from Silverlight Resource CenterSilverlight Resource Center
•• Microsoft Visual Studio Microsoft Visual Studio c oso t sua Stud oc oso t sua Stud o2008 SP12008 SP1
•• Microsoft Expression BlendMicrosoft Expression Blend•• Applications compile toApplications compile toApplications compile to Applications compile to
XAP fileXAP file
ArcGIS API for ArcGIS API for SilverlightSilverlightggSample ApplicationSample Application
•• IncludedIncluded–– MapMap–– ExtentExtent–– Tiled LayerTiled Layeryy–– Dynamic LayerDynamic Layer
Silverlight TasksSilverlight TasksggQuery and LocatorQuery and Locator
•• QueryQuery–– Attribute Query (Attribute Query (samplesample))
•• LocatorLocator–– Find an Address (Find an Address (samplesample))
ArcGIS API for ArcGIS API for SilverlightSilverlightggMashup ExampleMashup Example
•• Silverlight ShowcaseSilverlight Showcase
Web API 2.0 Some new key features
• Client-side feature layerClient side feature layer
• Editingg
• Time-aware API
Wrapping it upWrapping it upgg
•• Resource CenterResource Center––SamplesSamples––API ReferenceAPI Reference––Conceptual topicsConceptual topicsConceptual topicsConceptual topics––Code GalleryCode Gallery––Media GalleryMedia Gallery––ForumsForums––Sample ServicesSample Services
•• ESRI users’ live sitesESRI users’ live sites––http://www.esri.com/software/arcgis/arcgisserver/livehttp://www.esri.com/software/arcgis/arcgisserver/live--
useruser sites htmlsites htmluseruser--sites.htmlsites.html
Wrapping it upWrapping it uppp g ppp g p
•• What task(s) do I need to accomplish?What task(s) do I need to accomplish?What task(s) do I need to accomplish?What task(s) do I need to accomplish?––Business needs, etc.Business needs, etc.
•• “Which API should I use?”“Which API should I use?”
•• Services are reusable.Services are reusable.
•• GIS is not just for GIS is not just for geographers anymore.geographers anymore.
Questions?Questions?