SlideShare una empresa de Scribd logo
1 de 18
Building Web Apps with the
Esri-Leaflet Plugin
Aaron Parecki @aaronpk
CTO, Esri R&D Center Portland
Esri-Leaflet
ArcGIS Services Plug-in
Leaflet
 Open
 Pure

source mapping library

JavaScript – 31kb

 Simple,
 Many

easy to use, mobile friendly

plug-ins

www.leafletjs.com
Leaflet Features
What’s there?

What’s missing?

 Draw

 Basemaps

 Add

pop-ups

 Read
 Add

map tiles
GeoJSON

graphics

 Symbolize
 Control
 Add

features

layers

other controls

 Plugins…

 ArcGIS

support
 Basemaps
 Feature Services
 Other Services


Widgets
 Webmaps
 Cloud

storage
Esri-Leaflet
ArcGIS Online Services Plug-in

 Open

source plug-in for ArcGIS Online services

 Extends
 Built

L.class and namespace

with Terraformer - GeoJSON

http://esri.github.io/esri-leaflet/
Esri-Leaflet: Getting Started
L.esri.xxx
<!DOCTYPE html>
<html>
<head>
<title>Esri Leaflet</title>
<link rel="stylesheet" href="/the/path/to/leaflet.css" />
<style>
html, body, #map { width: 100%; height: 100%; }
</style>
<script src="/the/path/to/leaflet.js"></script>
<script src="/the/path/to/esri-leaflet.min.js"></script>
</head>
<body>
<div id="map"></div>
<script>
var map = L.map('map');
L.esri.basemapLayer("Streets").addTo(map);
map.setView([38.97993, -104.9794], 12);
</script>
</body>
</html>
Esri-Leaflet: ArcGIS Basemaps
http://esri.github.io/esri-leaflet/arcgisbasemaps.html

L.esri.BasemapLayer = L.TileLayer.extend({…
// Load an ArcGIS basemap
var map = L.map('map').setView([37.75,-122.45], 12);
L.esri.basemapLayer("Topographic").addTo(map);
// Supported basemap types
//L.esri.basemapLayer("Streets").addTo(map);
//L.esri.basemapLayer("Oceans").addTo(map);
//L.esri.basemapLayer("NationalGeographic").addTo(map);
//L.esri.basemapLayer("Gray").addTo(map);
//L.esri.basemapLayer("GrayLabels").addTo(map);
//L.esri.basemapLayer("Imagery").addTo(map);
//L.esri.basemapLayer("ImageryLabels").addTo(map);
Esri-Leaflet: ArcGIS FeatureServices
http://esri.github.io/esri-leaflet/arcgisfeatureservice.html

L.esri.FeatureLayer = L.GeoJSON.extend({…
// Access ArcGIS FeatureService
var map = L.map('map').setView([45.52963623111275, -122.67389774322508],
12);
L.esri.basemapLayer("Topographic").addTo(map);
var url =
'http://services.arcgis.com/rOo16HdIMeOBI4Mb/arcgis/rest/services/stops/Feature
Server/0’
L.esri.featureLayer(url);
Esri-Leaflet: Symbols
http://esri.github.io/esri-leaflet/symbolizepointfeatures.html
// Create FeatureLayer and define styles
L.esri.featureLayer(url, {
style: function (feature) {
return getStyle(feature);
}).addTo(map);
function getStyle(feature) {
var c,o = 0.5;
switch (feature.properties.BIKEMODE) {
case "Low traffic through street":
c = "#007D7D";
break;
case "Bike boulevard":
c = "#00FF3C";
break;
…
}
return {color: c, opacity: o};
}
Esri-Leaflet: Popups
// Create FeatureLayer and bind to popup
L.esri.featureLayer(featureServiceUrl, {
onEachFeature: createPopup
}).addTo(map);
// Define popup content - show all fields and values
function createPopup(geojson,layer) {
if (geojson.properties) {
var popupText = "<div style='max-height:200px;'>";
for (prop in geojson.properties) {
var val = geojson.properties[prop];
if (val) {
popupText += "<b>" + prop + "</b>: " + val + "<br>";
}
}
popupText += "</div>";
layer.bindPopup(popupText);
}
}
Esri-Leaflet: DynamicMapLayer
http://esri.github.io/esri-leaflet/dynamicmapservice.html
// ArcGIS Server Dynamic Map Service - Hurricane Tracks
dynLayer =
L.esri.dynamicMapLayer("http://tmservices1.esri.com/arcgis/rest/services/LiveFeeds/H
urricane_Recent/MapServer", { layers:[0,1] });
// Identifying Dynamic Map Service Features
map.on("click", function(e) {
dynLayer.identify(e.latlng, {
layerDefs: {
0: "STORMNAME='ANDREA'",
1: "STORMNAME='ANDREA'"
}
}, function(data) {
popupText = "<center><b>" +
data.results[0].attributes.STORMNAME + "</b><br>" +
data.results[0].attributes.STORMTYPE + "</center>”;
L.popup().setLatLng(e.latlng).setContent
(popupText).openOn(map);
}
});
});
Esri-Leaflet: ClusterFeatureLayer
http://esri.github.io/esri-leaflet/basicclustering.html
// Reference cluster plug-in and esri feature layer
<script src="lib/markercluster/leaflet.markercluster.js"></script>
<script src="lib/esri-leaflet/extras/clustered-feature-layer.js"></script>
// Create and add a new feature cluster layer
var fl =
L.esri.clusteredFeatureLayer("http://services.arcgis.com/rOo16HdIMeOBI4Mb/arcgis/rest/
services/stops/FeatureServer/0", {
cluster: new L.MarkerClusterGroup(),
onEachMarker: function(geojson, marker) {
marker.bindPopup("<h3>"+
geojson.properties.stop_name+"</h3><p>
Stop ID: "+geojson.properties.stop_id+"</p><p>”
+geojson.properties.stop_desc+"</p>")
}
}).addTo(map);
Esri-Leaflet: FeatureService Query
http://esri.github.io/esri-leaflet/featureservicequery.html
// Access feature service directly and query (geoservices.js)
var fs = new GeoServices.FeatureService({url:featureServiceUrl}, function (err, results)
{
var queryOptions = document.getElementById("query");
var query = queryOptions.text;
var queryEnvelope =
JSON.stringify(L.esri.Util.boundsToExtent(map.getBounds()));
// Build query parameters
var params = {
f:"json”, where: query,
geometry: queryEnvelope,
spatialRel: "esriSpatialRelIntersects”,
returnGeometry:true, outSR: 4326, outFields:"*"
};
// Query the feature service
fs.query(params, function (err, results) {
addFeaturesToMap(results);
}
}
Esri-Leaflet: Geocoding
http://esri.github.io/esri-leaflet/findplaces.html
// Reference geoservices.js
<script src="lib/geoservices/geoservices.js"></script>
…
var GeoServices = new Geoservices.Geoservices({});
var options = {
text:searchString,
outFields: "Loc_name,Place_addr",
bbox: mapBounds }
// Add geocodes to map
GeoServices.geocode(options, function (err,result) {
for (var i = 0; i < result.locations.length; i++) {
var place = result.locations[i];
var pt = new L.LatLng(place.feature.geometry.y, place.feature.geometry.x);
var marker = L.marker(pt).bindPopup(place.name + "</br>" +
place.feature.attributes.Place_addr);
layerPlaces.addLayer(marker);
}
}
Esri-Leaflet: Directions
http://esri.github.io/esri-leaflet/directions.html

 Directions
 Use

service requires an access token

OAuth 2.0 to log users in without obtaining
their password
Licensing
 Free ArcGIS

Developer Subscription

 Testing

and development
 Public deployments (non-commercial)
 50 credits
 Paid ArcGIS

Developer or ArcGIS Organization

Subscription
 Private

deployments
 Commercial deployments (generates revenue)
esri.github.com

Más contenido relacionado

La actualidad más candente

Integrate CI/CD Pipelines with Jira Software Cloud
Integrate CI/CD Pipelines with Jira Software CloudIntegrate CI/CD Pipelines with Jira Software Cloud
Integrate CI/CD Pipelines with Jira Software CloudAtlassian
 
O365Con18 - Create an Immersive Experience with Office365 Data and Mixed Real...
O365Con18 - Create an Immersive Experience with Office365 Data and Mixed Real...O365Con18 - Create an Immersive Experience with Office365 Data and Mixed Real...
O365Con18 - Create an Immersive Experience with Office365 Data and Mixed Real...NCCOMMS
 
FIWARE: Managing Context Information at Large Scale (NGSIv1)
FIWARE: Managing Context Information at Large Scale (NGSIv1)FIWARE: Managing Context Information at Large Scale (NGSIv1)
FIWARE: Managing Context Information at Large Scale (NGSIv1)Fermin Galan
 
Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and A...
Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and A...Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and A...
Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and A...Esri Nederland
 
Open Source Mobile Backend on Cassandra
Open Source Mobile Backend on CassandraOpen Source Mobile Backend on Cassandra
Open Source Mobile Backend on CassandraEd Anuff
 
Build 2017 - B8108 - App engagement in Windows Timeline and Cortana with User...
Build 2017 - B8108 - App engagement in Windows Timeline and Cortana with User...Build 2017 - B8108 - App engagement in Windows Timeline and Cortana with User...
Build 2017 - B8108 - App engagement in Windows Timeline and Cortana with User...Windows Developer
 
Access to User Activities - Activity Platform APIs
Access to User Activities - Activity Platform APIsAccess to User Activities - Activity Platform APIs
Access to User Activities - Activity Platform APIsAtlassian
 
How to Contribute to Apache Usergrid
How to Contribute to Apache UsergridHow to Contribute to Apache Usergrid
How to Contribute to Apache UsergridDavid M. Johnson
 
Introduction to Google App Engine
Introduction to Google App EngineIntroduction to Google App Engine
Introduction to Google App EngineAndrea Spadaccini
 
Building API in the cloud using Azure Functions
Building API in the cloud using Azure FunctionsBuilding API in the cloud using Azure Functions
Building API in the cloud using Azure FunctionsAleksandar Bozinovski
 
Rapid Application Development with SwiftUI and Firebase
Rapid Application Development with SwiftUI and FirebaseRapid Application Development with SwiftUI and Firebase
Rapid Application Development with SwiftUI and FirebasePeter Friese
 
Developing Java Web Applications In Google App Engine
Developing Java Web Applications In Google App EngineDeveloping Java Web Applications In Google App Engine
Developing Java Web Applications In Google App EngineTahir Akram
 
Google App Engine for Java
Google App Engine for JavaGoogle App Engine for Java
Google App Engine for JavaLars Vogel
 
Building a Lightning App with Angular Material Design
Building a Lightning App with Angular Material DesignBuilding a Lightning App with Angular Material Design
Building a Lightning App with Angular Material DesignSalesforce Developers
 
Developing a Provider Hosted SharePoint app
Developing a Provider Hosted SharePoint appDeveloping a Provider Hosted SharePoint app
Developing a Provider Hosted SharePoint appTalbott Crowell
 

La actualidad más candente (20)

Integrate CI/CD Pipelines with Jira Software Cloud
Integrate CI/CD Pipelines with Jira Software CloudIntegrate CI/CD Pipelines with Jira Software Cloud
Integrate CI/CD Pipelines with Jira Software Cloud
 
O365Con18 - Create an Immersive Experience with Office365 Data and Mixed Real...
O365Con18 - Create an Immersive Experience with Office365 Data and Mixed Real...O365Con18 - Create an Immersive Experience with Office365 Data and Mixed Real...
O365Con18 - Create an Immersive Experience with Office365 Data and Mixed Real...
 
FIWARE: Managing Context Information at Large Scale (NGSIv1)
FIWARE: Managing Context Information at Large Scale (NGSIv1)FIWARE: Managing Context Information at Large Scale (NGSIv1)
FIWARE: Managing Context Information at Large Scale (NGSIv1)
 
Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and A...
Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and A...Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and A...
Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and A...
 
Open Source Mobile Backend on Cassandra
Open Source Mobile Backend on CassandraOpen Source Mobile Backend on Cassandra
Open Source Mobile Backend on Cassandra
 
Build 2017 - B8108 - App engagement in Windows Timeline and Cortana with User...
Build 2017 - B8108 - App engagement in Windows Timeline and Cortana with User...Build 2017 - B8108 - App engagement in Windows Timeline and Cortana with User...
Build 2017 - B8108 - App engagement in Windows Timeline and Cortana with User...
 
Access to User Activities - Activity Platform APIs
Access to User Activities - Activity Platform APIsAccess to User Activities - Activity Platform APIs
Access to User Activities - Activity Platform APIs
 
Google App Engine tutorial
Google App Engine tutorialGoogle App Engine tutorial
Google App Engine tutorial
 
Introduction to Google App Engine
Introduction to Google App EngineIntroduction to Google App Engine
Introduction to Google App Engine
 
How to Contribute to Apache Usergrid
How to Contribute to Apache UsergridHow to Contribute to Apache Usergrid
How to Contribute to Apache Usergrid
 
Building a Better BaaS
Building a Better BaaSBuilding a Better BaaS
Building a Better BaaS
 
Introduction to Google App Engine
Introduction to Google App EngineIntroduction to Google App Engine
Introduction to Google App Engine
 
Building API in the cloud using Azure Functions
Building API in the cloud using Azure FunctionsBuilding API in the cloud using Azure Functions
Building API in the cloud using Azure Functions
 
Rapid Application Development with SwiftUI and Firebase
Rapid Application Development with SwiftUI and FirebaseRapid Application Development with SwiftUI and Firebase
Rapid Application Development with SwiftUI and Firebase
 
Developing Java Web Applications In Google App Engine
Developing Java Web Applications In Google App EngineDeveloping Java Web Applications In Google App Engine
Developing Java Web Applications In Google App Engine
 
Google App Engine for Java
Google App Engine for JavaGoogle App Engine for Java
Google App Engine for Java
 
Building a Lightning App with Angular Material Design
Building a Lightning App with Angular Material DesignBuilding a Lightning App with Angular Material Design
Building a Lightning App with Angular Material Design
 
Developing a Provider Hosted SharePoint app
Developing a Provider Hosted SharePoint appDeveloping a Provider Hosted SharePoint app
Developing a Provider Hosted SharePoint app
 
[Roine] Serverless: Don't Take It Literally
[Roine] Serverless: Don't Take It Literally[Roine] Serverless: Don't Take It Literally
[Roine] Serverless: Don't Take It Literally
 
Esri Map App Builders
Esri Map App BuildersEsri Map App Builders
Esri Map App Builders
 

Similar a Building Web Apps with the Esri-Leaflet Plugin - Dubai DevSummit 2013

2015 FOSS4G Track - Building Lightweight Mapping Apps with Esri Leaflet by An...
2015 FOSS4G Track - Building Lightweight Mapping Apps with Esri Leaflet by An...2015 FOSS4G Track - Building Lightweight Mapping Apps with Esri Leaflet by An...
2015 FOSS4G Track - Building Lightweight Mapping Apps with Esri Leaflet by An...GIS in the Rockies
 
ArcGIS API for Javascript Tutorial
ArcGIS API for Javascript TutorialArcGIS API for Javascript Tutorial
ArcGIS API for Javascript TutorialMohammed Mahmoud
 
ArcGIS JavaScript API (build a web layer-based map application with html5 and...
ArcGIS JavaScript API (build a web layer-based map application with html5 and...ArcGIS JavaScript API (build a web layer-based map application with html5 and...
ArcGIS JavaScript API (build a web layer-based map application with html5 and...Stefano Marchisio
 
ESRI Dev Meetup: Building Distributed JavaScript Map Widgets
ESRI Dev Meetup: Building Distributed JavaScript Map WidgetsESRI Dev Meetup: Building Distributed JavaScript Map Widgets
ESRI Dev Meetup: Building Distributed JavaScript Map WidgetsAllan Glen
 
Python en la Plataforma ArcGIS
Python en la Plataforma ArcGISPython en la Plataforma ArcGIS
Python en la Plataforma ArcGISXander Bakker
 
Building a mobile, cloud, checkin app in 75 minutes - zero to hero.
Building a mobile, cloud, checkin app in 75 minutes -  zero to hero.Building a mobile, cloud, checkin app in 75 minutes -  zero to hero.
Building a mobile, cloud, checkin app in 75 minutes - zero to hero.OReillyWhere20
 
Dev Summit 2011 - Talk
Dev Summit 2011 - TalkDev Summit 2011 - Talk
Dev Summit 2011 - TalkArc2Earth
 
Ioannis Doxaras on GIS and Gmaps at 1st GTUG meetup Greece
Ioannis Doxaras on GIS and Gmaps at 1st GTUG meetup Greece Ioannis Doxaras on GIS and Gmaps at 1st GTUG meetup Greece
Ioannis Doxaras on GIS and Gmaps at 1st GTUG meetup Greece CoLab Athens
 
Open Maps (Or Close Enough?)
Open Maps (Or Close Enough?)Open Maps (Or Close Enough?)
Open Maps (Or Close Enough?)Pamela Fox
 
NDGISUC2017 - Introducing ArcGIS Pro
NDGISUC2017 - Introducing ArcGIS ProNDGISUC2017 - Introducing ArcGIS Pro
NDGISUC2017 - Introducing ArcGIS ProNorth Dakota GIS Hub
 
Connecting Pebble to the World
Connecting Pebble to the WorldConnecting Pebble to the World
Connecting Pebble to the WorldPebble Technology
 
Spark what's new what's coming
Spark what's new what's comingSpark what's new what's coming
Spark what's new what's comingDatabricks
 
Adding where to your ruby apps
Adding where to your ruby appsAdding where to your ruby apps
Adding where to your ruby appsRoberto Pepato
 
Xitrum Web Framework Live Coding Demos / Xitrum Web Framework ライブコーディング
Xitrum Web Framework Live Coding Demos / Xitrum Web Framework ライブコーディングXitrum Web Framework Live Coding Demos / Xitrum Web Framework ライブコーディング
Xitrum Web Framework Live Coding Demos / Xitrum Web Framework ライブコーディングscalaconfjp
 
Xitrum @ Scala Matsuri Tokyo 2014
Xitrum @ Scala Matsuri Tokyo 2014Xitrum @ Scala Matsuri Tokyo 2014
Xitrum @ Scala Matsuri Tokyo 2014Ngoc Dao
 
What's New for Cartography in ArcGIS 10.2
What's New for Cartography in ArcGIS 10.2What's New for Cartography in ArcGIS 10.2
What's New for Cartography in ArcGIS 10.2Aileen Buckley
 
Monitoring Spark Applications
Monitoring Spark ApplicationsMonitoring Spark Applications
Monitoring Spark ApplicationsTzach Zohar
 
Latest Developments in Oceanographic Applications of GIS, including Near-real...
Latest Developments in Oceanographic Applications of GIS, including Near-real...Latest Developments in Oceanographic Applications of GIS, including Near-real...
Latest Developments in Oceanographic Applications of GIS, including Near-real...Dawn Wright
 

Similar a Building Web Apps with the Esri-Leaflet Plugin - Dubai DevSummit 2013 (20)

2015 FOSS4G Track - Building Lightweight Mapping Apps with Esri Leaflet by An...
2015 FOSS4G Track - Building Lightweight Mapping Apps with Esri Leaflet by An...2015 FOSS4G Track - Building Lightweight Mapping Apps with Esri Leaflet by An...
2015 FOSS4G Track - Building Lightweight Mapping Apps with Esri Leaflet by An...
 
ArcGIS API for Javascript Tutorial
ArcGIS API for Javascript TutorialArcGIS API for Javascript Tutorial
ArcGIS API for Javascript Tutorial
 
ArcGIS JavaScript API (build a web layer-based map application with html5 and...
ArcGIS JavaScript API (build a web layer-based map application with html5 and...ArcGIS JavaScript API (build a web layer-based map application with html5 and...
ArcGIS JavaScript API (build a web layer-based map application with html5 and...
 
CARTO ENGINE
CARTO ENGINECARTO ENGINE
CARTO ENGINE
 
ESRI Dev Meetup: Building Distributed JavaScript Map Widgets
ESRI Dev Meetup: Building Distributed JavaScript Map WidgetsESRI Dev Meetup: Building Distributed JavaScript Map Widgets
ESRI Dev Meetup: Building Distributed JavaScript Map Widgets
 
Python en la Plataforma ArcGIS
Python en la Plataforma ArcGISPython en la Plataforma ArcGIS
Python en la Plataforma ArcGIS
 
Building a mobile, cloud, checkin app in 75 minutes - zero to hero.
Building a mobile, cloud, checkin app in 75 minutes -  zero to hero.Building a mobile, cloud, checkin app in 75 minutes -  zero to hero.
Building a mobile, cloud, checkin app in 75 minutes - zero to hero.
 
Dev Summit 2011 - Talk
Dev Summit 2011 - TalkDev Summit 2011 - Talk
Dev Summit 2011 - Talk
 
Ioannis Doxaras on GIS and Gmaps at 1st GTUG meetup Greece
Ioannis Doxaras on GIS and Gmaps at 1st GTUG meetup Greece Ioannis Doxaras on GIS and Gmaps at 1st GTUG meetup Greece
Ioannis Doxaras on GIS and Gmaps at 1st GTUG meetup Greece
 
Open Maps (Or Close Enough?)
Open Maps (Or Close Enough?)Open Maps (Or Close Enough?)
Open Maps (Or Close Enough?)
 
NDGISUC2017 - Introducing ArcGIS Pro
NDGISUC2017 - Introducing ArcGIS ProNDGISUC2017 - Introducing ArcGIS Pro
NDGISUC2017 - Introducing ArcGIS Pro
 
Connecting Pebble to the World
Connecting Pebble to the WorldConnecting Pebble to the World
Connecting Pebble to the World
 
Spark what's new what's coming
Spark what's new what's comingSpark what's new what's coming
Spark what's new what's coming
 
JQuery Flot
JQuery FlotJQuery Flot
JQuery Flot
 
Adding where to your ruby apps
Adding where to your ruby appsAdding where to your ruby apps
Adding where to your ruby apps
 
Xitrum Web Framework Live Coding Demos / Xitrum Web Framework ライブコーディング
Xitrum Web Framework Live Coding Demos / Xitrum Web Framework ライブコーディングXitrum Web Framework Live Coding Demos / Xitrum Web Framework ライブコーディング
Xitrum Web Framework Live Coding Demos / Xitrum Web Framework ライブコーディング
 
Xitrum @ Scala Matsuri Tokyo 2014
Xitrum @ Scala Matsuri Tokyo 2014Xitrum @ Scala Matsuri Tokyo 2014
Xitrum @ Scala Matsuri Tokyo 2014
 
What's New for Cartography in ArcGIS 10.2
What's New for Cartography in ArcGIS 10.2What's New for Cartography in ArcGIS 10.2
What's New for Cartography in ArcGIS 10.2
 
Monitoring Spark Applications
Monitoring Spark ApplicationsMonitoring Spark Applications
Monitoring Spark Applications
 
Latest Developments in Oceanographic Applications of GIS, including Near-real...
Latest Developments in Oceanographic Applications of GIS, including Near-real...Latest Developments in Oceanographic Applications of GIS, including Near-real...
Latest Developments in Oceanographic Applications of GIS, including Near-real...
 

Más de Aaron Parecki

Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013Aaron Parecki
 
Rule Your Geometry with the Terraformer Toolkit
Rule Your Geometry with the Terraformer ToolkitRule Your Geometry with the Terraformer Toolkit
Rule Your Geometry with the Terraformer ToolkitAaron Parecki
 
Intro to the ArcGIS Geotrigger Service
Intro to the ArcGIS Geotrigger ServiceIntro to the ArcGIS Geotrigger Service
Intro to the ArcGIS Geotrigger ServiceAaron Parecki
 
Low Friction Personal Data Collection - Quantified Self Global Conference 2013
Low Friction Personal Data Collection - Quantified Self Global Conference 2013Low Friction Personal Data Collection - Quantified Self Global Conference 2013
Low Friction Personal Data Collection - Quantified Self Global Conference 2013Aaron Parecki
 
Low Friction Personal Data Collection - QS Portland
Low Friction Personal Data Collection - QS PortlandLow Friction Personal Data Collection - QS Portland
Low Friction Personal Data Collection - QS PortlandAaron Parecki
 
Done Reports - Open Source Bridge
Done Reports - Open Source BridgeDone Reports - Open Source Bridge
Done Reports - Open Source BridgeAaron Parecki
 
Esri DevSummit 2013 Speed Geeking: Intro to Esri Geotrigger Service for ArcGIS
Esri DevSummit 2013 Speed Geeking: Intro to Esri Geotrigger Service for ArcGISEsri DevSummit 2013 Speed Geeking: Intro to Esri Geotrigger Service for ArcGIS
Esri DevSummit 2013 Speed Geeking: Intro to Esri Geotrigger Service for ArcGISAaron Parecki
 
UC2013 Speed Geeking: Intro to OAuth2
UC2013 Speed Geeking: Intro to OAuth2UC2013 Speed Geeking: Intro to OAuth2
UC2013 Speed Geeking: Intro to OAuth2Aaron Parecki
 
Low Friction Personal Data Collection - Open Source Bridge
Low Friction Personal Data Collection - Open Source BridgeLow Friction Personal Data Collection - Open Source Bridge
Low Friction Personal Data Collection - Open Source BridgeAaron Parecki
 
Low Friction Personal Data Collection - CyborgCamp 2012
Low Friction Personal Data Collection - CyborgCamp 2012Low Friction Personal Data Collection - CyborgCamp 2012
Low Friction Personal Data Collection - CyborgCamp 2012Aaron Parecki
 
Personal Data Collection Breakout Session Notes
Personal Data Collection Breakout Session NotesPersonal Data Collection Breakout Session Notes
Personal Data Collection Breakout Session NotesAaron Parecki
 
An Introduction to OAuth 2
An Introduction to OAuth 2An Introduction to OAuth 2
An Introduction to OAuth 2Aaron Parecki
 
An Introduction to OAuth2
An Introduction to OAuth2An Introduction to OAuth2
An Introduction to OAuth2Aaron Parecki
 
OAuth 2 at Webvisions
OAuth 2 at WebvisionsOAuth 2 at Webvisions
OAuth 2 at WebvisionsAaron Parecki
 
Home Automation with SMS and GPS
Home Automation with SMS and GPSHome Automation with SMS and GPS
Home Automation with SMS and GPSAaron Parecki
 
The Current State of OAuth 2
The Current State of OAuth 2The Current State of OAuth 2
The Current State of OAuth 2Aaron Parecki
 
Ambient Discovery - Augmented Reality Event 2011
Ambient Discovery - Augmented Reality Event 2011Ambient Discovery - Augmented Reality Event 2011
Ambient Discovery - Augmented Reality Event 2011Aaron Parecki
 
Geolocation in Web and Native Mobile Apps
Geolocation in Web and Native Mobile AppsGeolocation in Web and Native Mobile Apps
Geolocation in Web and Native Mobile AppsAaron Parecki
 
Ambient Location Apps and Geoloqi
Ambient Location Apps and GeoloqiAmbient Location Apps and Geoloqi
Ambient Location Apps and GeoloqiAaron Parecki
 

Más de Aaron Parecki (20)

Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013
 
Rule Your Geometry with the Terraformer Toolkit
Rule Your Geometry with the Terraformer ToolkitRule Your Geometry with the Terraformer Toolkit
Rule Your Geometry with the Terraformer Toolkit
 
Intro to the ArcGIS Geotrigger Service
Intro to the ArcGIS Geotrigger ServiceIntro to the ArcGIS Geotrigger Service
Intro to the ArcGIS Geotrigger Service
 
Low Friction Personal Data Collection - Quantified Self Global Conference 2013
Low Friction Personal Data Collection - Quantified Self Global Conference 2013Low Friction Personal Data Collection - Quantified Self Global Conference 2013
Low Friction Personal Data Collection - Quantified Self Global Conference 2013
 
Low Friction Personal Data Collection - QS Portland
Low Friction Personal Data Collection - QS PortlandLow Friction Personal Data Collection - QS Portland
Low Friction Personal Data Collection - QS Portland
 
Done Reports - Open Source Bridge
Done Reports - Open Source BridgeDone Reports - Open Source Bridge
Done Reports - Open Source Bridge
 
Esri DevSummit 2013 Speed Geeking: Intro to Esri Geotrigger Service for ArcGIS
Esri DevSummit 2013 Speed Geeking: Intro to Esri Geotrigger Service for ArcGISEsri DevSummit 2013 Speed Geeking: Intro to Esri Geotrigger Service for ArcGIS
Esri DevSummit 2013 Speed Geeking: Intro to Esri Geotrigger Service for ArcGIS
 
UC2013 Speed Geeking: Intro to OAuth2
UC2013 Speed Geeking: Intro to OAuth2UC2013 Speed Geeking: Intro to OAuth2
UC2013 Speed Geeking: Intro to OAuth2
 
Low Friction Personal Data Collection - Open Source Bridge
Low Friction Personal Data Collection - Open Source BridgeLow Friction Personal Data Collection - Open Source Bridge
Low Friction Personal Data Collection - Open Source Bridge
 
The State of OAuth2
The State of OAuth2The State of OAuth2
The State of OAuth2
 
Low Friction Personal Data Collection - CyborgCamp 2012
Low Friction Personal Data Collection - CyborgCamp 2012Low Friction Personal Data Collection - CyborgCamp 2012
Low Friction Personal Data Collection - CyborgCamp 2012
 
Personal Data Collection Breakout Session Notes
Personal Data Collection Breakout Session NotesPersonal Data Collection Breakout Session Notes
Personal Data Collection Breakout Session Notes
 
An Introduction to OAuth 2
An Introduction to OAuth 2An Introduction to OAuth 2
An Introduction to OAuth 2
 
An Introduction to OAuth2
An Introduction to OAuth2An Introduction to OAuth2
An Introduction to OAuth2
 
OAuth 2 at Webvisions
OAuth 2 at WebvisionsOAuth 2 at Webvisions
OAuth 2 at Webvisions
 
Home Automation with SMS and GPS
Home Automation with SMS and GPSHome Automation with SMS and GPS
Home Automation with SMS and GPS
 
The Current State of OAuth 2
The Current State of OAuth 2The Current State of OAuth 2
The Current State of OAuth 2
 
Ambient Discovery - Augmented Reality Event 2011
Ambient Discovery - Augmented Reality Event 2011Ambient Discovery - Augmented Reality Event 2011
Ambient Discovery - Augmented Reality Event 2011
 
Geolocation in Web and Native Mobile Apps
Geolocation in Web and Native Mobile AppsGeolocation in Web and Native Mobile Apps
Geolocation in Web and Native Mobile Apps
 
Ambient Location Apps and Geoloqi
Ambient Location Apps and GeoloqiAmbient Location Apps and Geoloqi
Ambient Location Apps and Geoloqi
 

Último

WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 

Último (20)

WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 

Building Web Apps with the Esri-Leaflet Plugin - Dubai DevSummit 2013

  • 1. Building Web Apps with the Esri-Leaflet Plugin Aaron Parecki @aaronpk CTO, Esri R&D Center Portland
  • 3. Leaflet  Open  Pure source mapping library JavaScript – 31kb  Simple,  Many easy to use, mobile friendly plug-ins www.leafletjs.com
  • 4. Leaflet Features What’s there? What’s missing?  Draw  Basemaps  Add pop-ups  Read  Add map tiles GeoJSON graphics  Symbolize  Control  Add features layers other controls  Plugins…  ArcGIS support  Basemaps  Feature Services  Other Services  Widgets  Webmaps  Cloud storage
  • 5. Esri-Leaflet ArcGIS Online Services Plug-in  Open source plug-in for ArcGIS Online services  Extends  Built L.class and namespace with Terraformer - GeoJSON http://esri.github.io/esri-leaflet/
  • 6. Esri-Leaflet: Getting Started L.esri.xxx <!DOCTYPE html> <html> <head> <title>Esri Leaflet</title> <link rel="stylesheet" href="/the/path/to/leaflet.css" /> <style> html, body, #map { width: 100%; height: 100%; } </style> <script src="/the/path/to/leaflet.js"></script> <script src="/the/path/to/esri-leaflet.min.js"></script> </head> <body> <div id="map"></div> <script> var map = L.map('map'); L.esri.basemapLayer("Streets").addTo(map); map.setView([38.97993, -104.9794], 12); </script> </body> </html>
  • 7. Esri-Leaflet: ArcGIS Basemaps http://esri.github.io/esri-leaflet/arcgisbasemaps.html L.esri.BasemapLayer = L.TileLayer.extend({… // Load an ArcGIS basemap var map = L.map('map').setView([37.75,-122.45], 12); L.esri.basemapLayer("Topographic").addTo(map); // Supported basemap types //L.esri.basemapLayer("Streets").addTo(map); //L.esri.basemapLayer("Oceans").addTo(map); //L.esri.basemapLayer("NationalGeographic").addTo(map); //L.esri.basemapLayer("Gray").addTo(map); //L.esri.basemapLayer("GrayLabels").addTo(map); //L.esri.basemapLayer("Imagery").addTo(map); //L.esri.basemapLayer("ImageryLabels").addTo(map);
  • 8. Esri-Leaflet: ArcGIS FeatureServices http://esri.github.io/esri-leaflet/arcgisfeatureservice.html L.esri.FeatureLayer = L.GeoJSON.extend({… // Access ArcGIS FeatureService var map = L.map('map').setView([45.52963623111275, -122.67389774322508], 12); L.esri.basemapLayer("Topographic").addTo(map); var url = 'http://services.arcgis.com/rOo16HdIMeOBI4Mb/arcgis/rest/services/stops/Feature Server/0’ L.esri.featureLayer(url);
  • 9. Esri-Leaflet: Symbols http://esri.github.io/esri-leaflet/symbolizepointfeatures.html // Create FeatureLayer and define styles L.esri.featureLayer(url, { style: function (feature) { return getStyle(feature); }).addTo(map); function getStyle(feature) { var c,o = 0.5; switch (feature.properties.BIKEMODE) { case "Low traffic through street": c = "#007D7D"; break; case "Bike boulevard": c = "#00FF3C"; break; … } return {color: c, opacity: o}; }
  • 10. Esri-Leaflet: Popups // Create FeatureLayer and bind to popup L.esri.featureLayer(featureServiceUrl, { onEachFeature: createPopup }).addTo(map); // Define popup content - show all fields and values function createPopup(geojson,layer) { if (geojson.properties) { var popupText = "<div style='max-height:200px;'>"; for (prop in geojson.properties) { var val = geojson.properties[prop]; if (val) { popupText += "<b>" + prop + "</b>: " + val + "<br>"; } } popupText += "</div>"; layer.bindPopup(popupText); } }
  • 11. Esri-Leaflet: DynamicMapLayer http://esri.github.io/esri-leaflet/dynamicmapservice.html // ArcGIS Server Dynamic Map Service - Hurricane Tracks dynLayer = L.esri.dynamicMapLayer("http://tmservices1.esri.com/arcgis/rest/services/LiveFeeds/H urricane_Recent/MapServer", { layers:[0,1] }); // Identifying Dynamic Map Service Features map.on("click", function(e) { dynLayer.identify(e.latlng, { layerDefs: { 0: "STORMNAME='ANDREA'", 1: "STORMNAME='ANDREA'" } }, function(data) { popupText = "<center><b>" + data.results[0].attributes.STORMNAME + "</b><br>" + data.results[0].attributes.STORMTYPE + "</center>”; L.popup().setLatLng(e.latlng).setContent (popupText).openOn(map); } }); });
  • 12. Esri-Leaflet: ClusterFeatureLayer http://esri.github.io/esri-leaflet/basicclustering.html // Reference cluster plug-in and esri feature layer <script src="lib/markercluster/leaflet.markercluster.js"></script> <script src="lib/esri-leaflet/extras/clustered-feature-layer.js"></script> // Create and add a new feature cluster layer var fl = L.esri.clusteredFeatureLayer("http://services.arcgis.com/rOo16HdIMeOBI4Mb/arcgis/rest/ services/stops/FeatureServer/0", { cluster: new L.MarkerClusterGroup(), onEachMarker: function(geojson, marker) { marker.bindPopup("<h3>"+ geojson.properties.stop_name+"</h3><p> Stop ID: "+geojson.properties.stop_id+"</p><p>” +geojson.properties.stop_desc+"</p>") } }).addTo(map);
  • 13. Esri-Leaflet: FeatureService Query http://esri.github.io/esri-leaflet/featureservicequery.html // Access feature service directly and query (geoservices.js) var fs = new GeoServices.FeatureService({url:featureServiceUrl}, function (err, results) { var queryOptions = document.getElementById("query"); var query = queryOptions.text; var queryEnvelope = JSON.stringify(L.esri.Util.boundsToExtent(map.getBounds())); // Build query parameters var params = { f:"json”, where: query, geometry: queryEnvelope, spatialRel: "esriSpatialRelIntersects”, returnGeometry:true, outSR: 4326, outFields:"*" }; // Query the feature service fs.query(params, function (err, results) { addFeaturesToMap(results); } }
  • 14. Esri-Leaflet: Geocoding http://esri.github.io/esri-leaflet/findplaces.html // Reference geoservices.js <script src="lib/geoservices/geoservices.js"></script> … var GeoServices = new Geoservices.Geoservices({}); var options = { text:searchString, outFields: "Loc_name,Place_addr", bbox: mapBounds } // Add geocodes to map GeoServices.geocode(options, function (err,result) { for (var i = 0; i < result.locations.length; i++) { var place = result.locations[i]; var pt = new L.LatLng(place.feature.geometry.y, place.feature.geometry.x); var marker = L.marker(pt).bindPopup(place.name + "</br>" + place.feature.attributes.Place_addr); layerPlaces.addLayer(marker); } }
  • 15. Esri-Leaflet: Directions http://esri.github.io/esri-leaflet/directions.html  Directions  Use service requires an access token OAuth 2.0 to log users in without obtaining their password
  • 16. Licensing  Free ArcGIS Developer Subscription  Testing and development  Public deployments (non-commercial)  50 credits  Paid ArcGIS Developer or ArcGIS Organization Subscription  Private deployments  Commercial deployments (generates revenue)
  • 17.

Notas del editor

  1. Esri Corporate Template V2September 6, 2013See http://arczone/resources/presentations.cfm for more sample files and help.
  2. ----- Meeting Notes (11/20/13 10:52) -----show example of using custom tile services