Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I like to use the ArcGIS.com to create a map with operational layers on top of a baselayer. I would like to have the Content and Map as private but to show the map in an application built with JavaScript API. I tried using the new IdentityManager to make the application turn up a login dialog. It does, but I get: "Invalid username/password. Please try again."

enter image description here

I'm a newbie on ArcGIS.com and JS so might have mixed up something, does anyone know if it's possible to access maps that are not publicly shared? There is no problem to access the map using createmap as long as the map is share to everyone.

enter image description here

share|improve this question

1 Answer 1

up vote 6 down vote accepted

The identity manager needs to do a POST to login to access your webmap. Since you're hitting arcgis.com, this is a cross domain request so you need to do this via a proxy. Have you set up a proxy for your app?

Looking at the docs, this isn't clear. We'll update our documentation to say you need to use a proxy if you want to use a private webmap in an app you host yourself (if you haven't guessed, I work on the JS API team).

share|improve this answer
    
Downvoted and no comment? –  Derek Swingley Sep 30 '11 at 0:18
    
This seems like a perfectly reasonable answer to me.... –  Stephen Lead Sep 30 '11 at 1:40
1  
Oh well, this is the Internet... –  Derek Swingley Sep 30 '11 at 3:37
    
Thanks Derek! I'll give it a try! –  MathiasWestin Sep 30 '11 at 6:14
    
@Derek-Swingley I got the ASP.NET proxy up and running. But it would be great if the implementation would be able to get new tokens when needed. –  MathiasWestin Oct 4 '11 at 6:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.