The ArcGIS iOS app is a pretty cool general purpose app for accessing maps from your phone.Of course the first thing I wanted to do was add my own data into it.
When I used “Find Maps” in the app, one of the options is “ArcGIS Servers” – great! When I went to go and add my server, I noticed that the app is expecting a url like <yourserver>/arcgis/mobile. I went with my typical “damn the torpedos approach and entered the url to a REST map service anyhow. And… it crashed the app. Ok, so that’s not gonna work.
At the UC TweetUp I ran into my old friend Dave Cardella, who’s deeply involved with the iOS app development. He pointed out that the iOS app needs to consume a “map” (not a map service or a “map document” – this is another animal) and pointed me to the Publishing a Map pdf that’s up on the iOS resource center.
So, while enjoying the sound and light show that is the Plenary, I thought I’d try to get this working. Here’s how you do it.
Step 1: You need ArcGIS Server 10, so stop now if you’re still rockin 9.3.1. If you’re stuck on 9.3.1, you can publish a map on ArcGIS.com using your services, and then consume that from the iOS app. If you have a v10 instance, you can use that to publish the “map”, but point the “map” at your 9.3 REST end-point (which is more or less what ArcGIS.com would be doing for you)
Step 2: Go to your http://your.server.com/Arcgis/mobile/content/MobileWeb/Maps (example: http://ags.dtsagile.com/ArcGIS/Mobile/Content/MobileWeb/Maps)
Step 3: Ok, now it gets fun because we need to hack up some JSON… so open your text editor weapon-o-choice and get funky with it.
{ "version":"1.1", "operationalLayers":[ { "url":"http://ags.dtsagile.com/ArcGIS/rest/services/Wx/NEXRAD/MapServer", "visibility":true, "opacity":0.75, "title":"NEXRAD" } ], "baseMap":{ "baseMapLayers":[ { "url":"http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" } ], "title":"Street Map" } }
Ok, so that’s kind ugly, but basically you pick a basemap, and then throw your map service on top of that. This is JSON, so be really careful with those curly brackets and commas.
Step 4: Click the “Add” button – this will prompt you to login – needs to be a member of the agsadmins group on the server.
Step 5: Fill out the form. Items of note: the Json goes into the “Text” field. And you need to give it an extent in GCS (guys – why can that not be discovered???) Click Save and hopefully you’ll get a “Success: true” screen. (Could use a little User Experience love here)
Step 6: Fire up the iOS app, go to Find Maps, Add ArcGIS Server, and enter your newly setup service. If you just want to pull in some services, use http://184.73.175.237/ArcGIS/Mobile which is out ArcGIS cloud instance. After adding the server, you can see the “maps” that you’ve published. Right now I’ve got 3 maps up there that you can poke at…
Step 7: Pick a map and drink in the awesomeness! Having just cooked up a variety of mobile web apps, the performance of the native app shows why
Dave tells me that the will streamline this, but for now, this is your jimmy
Have fun!
Cool post.. I really like the ArcGIS app for my iPhone.FYI… you can take screen captures directly on your iPhone by pressing the home and lock buttons simultaneously. The screen will flash white for a second, then save the captured screen to your Camera Roll
Cheers,Isaac
Hi there,thanks for the post, but unless this has gotten any better, there is no way that I, or anyone else like me, will do this. Shouldn’t ArcGIS Server be smart enough to realize that it has an ESRI-built application hitting it? Why would they release an application that doesn’t make this easy.This is so typical. My production environment, $20K software, and I need to hack together something to get it to be really useful.
Dave, you ever get this working in a secure enviro? Just having fun now with this…. Documentation light : (
OK, got it.. ESRI documentation not just light, its incorrect ; ) Obvious but just ensure you include an item during your add-item config (as opposed to what the current doco says (i was ensured the doco is going to be updated soon)… Now onto feature service editing..
Do you know if the process works in the same way in ArcGIS for Android Apps????
I have not tried it, but essentially yes – you need to author a web map and then consume that map in the app.
Dave