Invalid Web Map ID

1734
5
Jump to solution
03-20-2018 04:07 PM
Jay_Ehn
New Contributor II

Hello,

I'm new to ArcGIS stuff so this is probably a simple question. I was doing the tutorial for creating Web Maps in the 4.6 Javascript API and thought I'd try to use one of our own portal's webmaps.

However, the end of the url reads as "id=mapidhere". I can't get that to work. I noticed that the ArcGIS examples have "webmap=mapidhere" instead. I'm getting a "message: "Invalid portal item type 'Web Mapping Application', expected 'Web Map'" in the browser console, so I guess the map I'm using isn't right? Is there another way to get the right ID? Thanks.

1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Jay,

   If this is your web map you can go to your portal and look at the web map in your content and in the url you will see the web maps id. Since this was not mine I had to watch the browsers network traffic and find the call the app made to the web map.

Don't forget to mark this question as answered by clicking on the "Mark Correct" link on the reply that answered your question.

View solution in original post

5 Replies
RobertScheitlin__GISP
MVP Emeritus

Jay,

  So you are replacing the "mapidhere" portion with the id of your web map (i.e. e691172598f04ea8881cd2a4adaa45ba)?

0 Kudos
Jay_Ehn
New Contributor II

Yes. For example, I'm trying the id from this map: ArcGIS Web Application 

But it gives me the error message as above. I believe I've configured the esriConfig URL correctly because it seems to be finding something, but it doesn't like it.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Jay,

   That is the id to a web application not the web map that the application is using. This is the web map id d0a88a5528c54dfebb4e009e1a139936

0 Kudos
Jay_Ehn
New Contributor II

Thanks so much! It's working great now. Can I please ask how you got that other id?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Jay,

   If this is your web map you can go to your portal and look at the web map in your content and in the url you will see the web maps id. Since this was not mine I had to watch the browsers network traffic and find the call the app made to the web map.

Don't forget to mark this question as answered by clicking on the "Mark Correct" link on the reply that answered your question.