This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| This ArcGIS-based PubNub Block shows a pattern for running the routing service to find the best way to get from one location to another or to visit several locations. | |
| Declare the Event Handler with the export syntax. The incoming message is called request. | |
| The request object contains a starting coordinate and an ending coordinate: | |
| Set up the test payload | |
| { | |
| "start": { | |
| "lat": 37.783, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| This ArcGIS-based PubNub Block shows a pattern for converting a lat/lon coordinate to an address | |
| Declare the Event Handler with the export syntax. The incoming message is called request. | |
| Set up the test payload | |
| { | |
| "lat": -105.521, | |
| "lon": 40.377 | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <!-- | |
| Finds Esri Geoenrichment data within a 1 mile radius of a map click event | |
| --> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| This ArcGIS-based pubnub block shows a pattern for running powerful demographic data searches. | |
| Declare the Event Handler with the export syntax. The incoming message is called request. | |
| The request object can either be a single point or a polygon. Here is an example, 'y' is Latitude | |
| and 'x' is Longitude: | |
| { | |
| "x": -122.435, | |
| "y": 37.785 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| This ArcGIS-based pubnub block shows a pattern for running powerful demographic data searches. | |
| Declare the Event Handler with the export syntax. The incoming message is called request. | |
| The request object can either be a single point or a polygon. Here is an example, 'y' is Latitude | |
| and 'x' is Longitude: | |
| { | |
| "x": -122.435, | |
| "y": 37.785 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head lang="en"> | |
| <meta charset="UTF-8"> | |
| <title>XHR</title> | |
| </head> | |
| <body> | |
| <div id="result">Some result goes here</div> | |
| <script> | |
| var url = "https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver/GeoEnrichment/enrich"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function createMapWidgets() { | |
| var is2d = viewIs2D(); | |
| // Home | |
| homeWidget = new Home({view: view}); | |
| view.ui.add(homeWidget, "top-left"); | |
| // Zoom | |
| zoomWidget = new Zoom({view: view}); | |
| view.ui.add(zoomWidget, "top-left"); | |
| // Compass | |
| compassWidget = new Compass({view: view}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no"> | |
| <title>FeatureLayer</title> | |
| <!-- ArcGIS JavaScript API - Required CSS --> | |
| <link rel="stylesheet" href="https://js.arcgis.com/3.17/esri/css/esri.css"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "use strict"; | |
| /* | |
| * Utility library for deleting all features in a feature layer. | |
| * Use this to reset demo feature layers. | |
| * WARNING: this will delete EVERYTHING! | |
| */ | |
| function CleanFeatureLayer(featureLayer, callback) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
| <meta name="viewport" | |
| content="width=device-width, initial-scale=1.0, maximum-scale=1.0:, user-scalable=no"> | |
| <meta name="apple-mobile-web-app-capable" content="yes"> |