I am programmatically creating web maps via the ArcGIS Online REST API and noticed that the webmap json spec has an id property but I'm not sure where it comes from or how to best set it.

For a given feature layer, how can I obtain the "id" shown below in order to dynamically create the webmap json?

  "itemId":"73830d6b39e948eaa48286629d2ff7d2" ...

It'll depend on your usage, but, usually, I just make it up and just make sure it's unique. Programmatically, I might fetch the layer name, replace spaces with underscore, lowercase everything, and perhaps tack on a unique number from a counter...

  • So do you think this id property needs only to be unique within of the webmap? I guess i could see the scenario where the same webmap has multiple versions of the same layer which could require an additional id. – bcollins Oct 9 '14 at 17:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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