BLOG
|
Welcome to the GeoDev How-to series! This is a series of articles designed to show you how to build mapping applications quickly with the ArcGIS platform. They assume you’re interested in code, you are interested in mapping, geodata and analyses, and you want to build a web or mobile app quickly. In this how-to you will... Sign up for a free developer subscription Learn the workflow for creating apps with the ArcGIS Platform Review important ArcGIS tools, APIs and services Step 1: Sign up for a free ArcGIS Developer Subscription The first step to building an app is to sign up for a free ArcGIS Developer Subscription. This account is your entry point to the entire ArcGIS platform. With a subscription you can: Get the latest APIs and SDKs Build and register apps Create, store and manage geodata in the cloud with ArcGIS Online Access advanced geospatial web services Perform geospatial analyses Sign up for a developer subscription here. Tip: Please note that there are actually three different types of ArcGIS accounts: 1) ArcGIS Online public accounts, 2) ArcGIS Organization accounts and 3) ArcGIS Developer accounts. If you have a public account, you will need to create a new developer account to get a developer subscription. If you already have an ArcGIS Organization account, you can just use that by logging into ArcGIS for Developers. Learn more about accounts here. Step 2: Learn how to build an ArcGIS Mapping App There are a number of ways to build applications with the ArcGIS platform but here are the general steps. 1. Create or Access Data in the Cloud In order to tell a story, every mapping app needs data. The easiest way to create, access and manage data is to store it in the cloud with ArcGIS Online as web layers. The two basic types of web layers are Feature Layers (Feature Services) and Tile Layers (Tile Services). Feature Services are just points, lines and polygons stored in the cloud. They also expose RESTful web services that provide you mapping and query functionality. After you create a feature service you can access it directly via the ArcGIS REST API but it’s often easier just to access them with the ArcGIS SDKs and APIs. Tile services are another type of data that you can store in ArcGIS Online. Tile services are also web services that you can access with your applications. These are handy when you have large datasets and you want to draw them as images instead of rendering individual features. Learn more about web layers and services here. There are three main ways to access data for your apps: Search: Use the search tool in the ArcGIS Online gallery or the map viewer to find existing maps and layers. Upload: Import your own data such as .csv, .shp (shapefile) and .geojson to create a new hosted feature service. Create: Define a brand new empty dataset, add data to it and publish it in ArcGIS Online as a feature service. Log in to ArcGIS for Developers for this. Here’s an example of using ArcGIS Online to search for coffee shop layers in Portland. 2. Design a Map and Perform Analyses Before you write any code, it’s always best to do as much prototyping and analysis as possible using the ArcGIS Online Map Viewer. The viewer is a free online mapping app that lets you create maps, perform analyses and edit data. The viewer also provides the functionality to design and author nice maps. You can style map layers, change symbols, colors and textures, swap basemaps, configure pop-ups, and control layer visibility at different zoom levels. Any map that you create with the viewer can also be saved in ArcGIS Online and used directly in any app you build. Designing a good map is one of the most important aspects of mapping development, so this is a very important tool to get familiar with! Also, using the viewer will give you some exposure to what functionality is available at the API-level when it comes time to write code. Learn more about the map viewer here. Here are a few other things you can do with the map viewer: Add data (map layers) to your map Create new points, lines and polygons and edit them interactively Change the basemap (gray, topographic, streets…) Change symbols and colors Edit popups Perform geospatial analyses, such as buffering, shortest path and point-in-polygon Save maps for future reference Share maps with others Move your map into a pre-built template Share maps as ready to use customer apps Here's an example of a map created and styled with the map viewer to show coffee shop density. Tip: You can perform a number of different spatial and social-economic analyses with the map viewer. Learn more about the types of analyses you can do with ArcGIS Online and the map viewer here. 3. Create and Share your App The last part of the workflow is where you actually build an application. The two most common types of apps are web apps that you build with templates or the Web AppBuilder or custom mapping apps that you build with with the ArcGIS SDKs and APIs. In most cases, these apps consume maps, feature services or tile services directly. Learn more about the ArcGIS APIs here. Here’s a brief list of the types of apps you can build: ArcGIS JavaScript Apps - Custom HTML, CSS, JavaScript apps built with our ArcGIS for JavaScript API that you host. ArcGIS Mobile Apps - Native mobile apps that use the ArcGIS Runtime SDK for Android, iPhone and Windows Phone APIs. Desktop Apps - Apps that run on desktop operating systems that use the ArcGIS Runtime SDK for .Net, Qt, Java and Mac OS X. ArcGIS Web App Templates - Configurable HTML, CSS, JavaScript components that consume web maps. Web AppBuilder Apps - An interactive designer to create rich HTML, CSS, JavaScript apps and widgets that also consume web maps. Here’s an example of using the Web AppBuilder to design a web app that uses the coffee map created earlier. Tip: Learn more about how to build your own HTML5 apps with the Web AppBuilder here. Step 3: Learn more about ArcGIS If you are new to the ArcGIS platform, it’s also worth reviewing the following tools and resources and familiarizing yourself with some of the terminology before diving in too far. Tools ArcGIS for Developers - Website for all of your ArcGIS developer needs including tutorials, API docs and many samples. ArcGIS Online Gallery - Search for shared web maps, layers, and apps. ArcGIS Online Map Viewer - A powerful, online mapping application that runs in your web browser. Use this tool to create, symbolize and share maps and data. You can also use this tool to perform powerful geospatial analyses. ArcGIS Web AppBuilder - Interactive designer to create rich HTML, CSS, JavaScript apps and widgets that also consume web maps. API Documentation JavaScript, Android, iOS, Flex, Java, Mac OS X, .Net, Qt, Silverlight, WPF Geospatial Web Services Map Services - basemaps such as topographic, subtle gray, and world streets. Feature Services - visualize, query, add, update or delete features (points, lines, polygons) in the ArcGIS Online cloud. Geocoding - find locations, places, businesses and addresses all around the world Directions and Routing - get driving directions, find the closest facility, perform multi-stop routing, calculate drive-time polygons. GeoEnrichment - find demographic information for places, average age, household income and a lot more. There are hundreds of different data attributes. Spatial Analysis - find points that intersect polygons, create buffers, add/subtract data. Geometry Service - run complex operations such reprojection, convex hulls, areas, length and intersection. Elevation Analyses - access world-wide elevation data, generate 3D features, create elevation profiles, viewsheds and watersheds. Other Resources developers.arcgis.com Github.com/esri Quickstart-map-js GeoEnrichment API and associated Demographic data attributes Geotrigger for iOS and Android and geotrigger-js Terraformer.io ArcGIS REST API Related Articles GeoDev How-to: Getting Started with the ArcGIS Platform for Developers GeoDev How-to: Design your first custom web mapping app with the ArcGIS Platform GeoDev How-to: Perform spatial analyses for your mapping app [coming soon] ...
... View more
12-02-2014
04:51 PM
|
9
|
3
|
5488
|
BLOG
|
Have you ever wanted to access GitHub file resources directly as static hosted files but weren't able to? Well RawGit gives you a way to take the URL reference for any GitHub resource and make it properly accessible by a web browser or client application. All it does is provide a proxy that maps the HTTP Content-Type in the header to the appropriate file type so that it can be loaded properly. RawGit can generate both dev and prod url endpoints so make sure you understand the difference between them before deploying apps! As a bonus, the service is CORS-enabled so apps that require this functionality can access the resources and load files properly. So how do you get a static reference to your files? It's easy as 1-2-3! 1. Go to any GitHub file resource and copy the url https://github.com/Esri/geojson-layer-js/blob/master/data/dc-schools.json 2. Go to RawGit and paste in the url 3. Use the dev or prod RawGit reference in your apps Here's an example where I used RawGit to change a bunch of the local .js and .geojson references so I could run the app from fiddler.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=7,IE=9">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
<title>ArcGIS GeoJSON Layer</title>
<!-- ArcGIS API for JavaScript CSS-->
<link rel="stylesheet" href="https://community.esri.com//js.arcgis.com/3.10/js/esri/css/esri.css">
<!-- Web Framework CSS - Bootstrap (getbootstrap.com) and Bootstrap-map-js (github.com/esri/bootstrap-map-js) -->
<link rel="stylesheet" href="https://community.esri.com//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://community.esri.com//esri.github.io/bootstrap-map-js/src/css/bootstrapmap.css">
<style>
html, body, #mapDiv {
height: 100%;
width: 100%;
}
</style>
<!-- ArcGIS API for JavaScript library references -->
<script src="//js.arcgis.com/3.10"></script>
<!-- Terraformer reference -->
<script src="https://rawgit.com/Esri/geojson-layer-js/master/vendor/terraformer/terraformer.min.js"></script>
<script src="https://rawgit.com/Esri/geojson-layer-js/master/vendor/terraformer-arcgis-parser/terraformer-arcgis-parser.min.js"></script>
<script>
require(["esri/map",
"https://rawgit.com/Esri/geojson-layer-js/master/src/geojsonlayer.js",
"dojo/on",
"dojo/dom",
"dojo/domReady!"],
function (Map, GeoJsonLayer, on, dom) {
// Create map
var map = new Map("mapDiv", {
basemap: "gray",
center: [-122.5, 45.5],
zoom: 5
});
map.on("load", function () {
addGeoJsonLayer("https://rawgit.com/Esri/geojson-layer-js/master/data/dc-schools.json");
});
// Add the layer
function addGeoJsonLayer(url) {
// Create the layer
var geoJsonLayer = new GeoJsonLayer({
url: url
});
// Zoom to layer
geoJsonLayer.on("update-end", function (e) {
map.setExtent(e.target.extent.expand(1.2));
});
// Add to map
map.addLayer(geoJsonLayer);
}
});
</script>
</head>
<body>
<div id="mapDiv"></div>
</body>
</html>
... View more
11-04-2014
10:38 AM
|
1
|
1
|
5009
|
BLOG
|
If you are trying to log into developers.arcgis.com and you can't see all of the "developer features", then this article is for you! Types of ArcGIS Accounts There are actually three different types of accounts that you can log into ArcGIS for Developers with: Public, Organization and Developer. Each account enables a different level of functionality across the entire ArcGIS website and it also controls which menu items and tools are available. What features are available with each account? This is not intended to be an extensive list, but this will give you an idea of the key differences. Login Create and Share Maps Create Feature Services Perform Spatial Analyses Access all Developer Features Public Account y y n n n Organization Account y y y y y Developer Account y y y y y How can you tell what account you are logged in with? The easiest way to tell is by the menus that are available. Public Account (limited features) Organization Account (most features available) Developer Account (all features available) Are there differences in the ArcGIS Map Viewer? Yes, mostly in the tools that require advanced services that consume service credits. Public Account Developer or Organization Account Can you upgrade your Public account to a Developer account? No. You have to go to the ArcGIS for Developers site and create a brand new account with a different user name. And yes, you can use the same email address as your Public Account! That's it! So if you are on the site and you are missing functionality, either sign in with a Developer or Organization account or sign up for a brand new one and you'll be good to go.
... View more
10-15-2014
01:33 PM
|
1
|
4
|
3893
|
POST
|
See: https://github.com/Esri/bootstrap-map-js/issues/37
... View more
03-17-2014
08:17 AM
|
0
|
0
|
443
|
POST
|
@PMMJWeyland and @jeff.pace, re: Bootstrap integration with ArcGIS, you might want to check out this OS project I published a while back. It should jumpstart folks considerably. https://github.com/Esri/bootstrap-map-js Cheers! AL Esri
... View more
03-03-2014
05:07 PM
|
0
|
0
|
511
|
POST
|
This illustrates how to do authentication to the Esri geoservice. https://github.com/Esri/geoservices-js/blob/master/test/authentication-test.js AL esri
... View more
02-26-2014
08:32 PM
|
0
|
0
|
210
|
POST
|
ArcGIS Online can only host apps and templates. You have to host custom apps.
... View more
09-22-2013
12:12 AM
|
0
|
0
|
296
|
POST
|
Here's an example of a viewer with most of the functionality you are after. https://github.com/DavidSpriggs/ConfigurableViewerJSAPI AL
... View more
09-13-2013
08:43 AM
|
0
|
0
|
265
|
POST
|
If you "really" need to put all of that functionality into one single app, you could share out a number of templates and apps and then combine the source. Or if you could just build a custom app with our ArcGIS JavaScript API. The widgets will make things pretty easy. If at all possible I would recommend building out smaller more focused apps. AL
... View more
09-13-2013
08:23 AM
|
0
|
0
|
265
|
POST
|
Have you looked at our REST API? http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Add_Rasters/02r3000000vz000000/ AL
... View more
09-06-2013
11:53 AM
|
0
|
0
|
241
|