POST
|
Hello, I am trying to use the ArcGIS Online REST API to add an item for a WMS map service via an HTTP POST to: <base url>/content/users/<username>/addItem by posting the following data in the POST body: {"culture": "en-us", "f": "json", "token": token, "type": "WMS", "title": title, "url": "...my WMS url here...", "text": "my JSON text here", "extent": "-140.96, 60, -90.45,40} using something like the following JSON as the "text" above: { "layers": [ { "name": "my_layer", "title": "my_layer" } ], "maxWidth": 2048, "copyright": "copyright here", "format": null, "url": "...url here...", "mapUrl": "...url here...", "maxHeight": 2048, "version": "1.3.0", "title": "...title here...", "spatialReferences": [ 3857, 4326 ] } When I substitute in an actual WMS URL and a layer name, this works -- I can successfully add the layer to ArcGIS Online, and view it on a map. Now what I want to do is specify a WMS named style other than the default style to be applied to my layer. Said another way, I'd like ArcGIS Online to fill in the OGC WMS &STYLES=... parameter for all requests it makes to my layer. Is this possible via the ArcGIS Online REST API? Can someone provide an example of how I might modify the JSON above to specify a WMS style? Thanks!
... View more
08-28-2015
02:43 PM
|
0
|
0
|
3327
|
POST
|
Hello All, I am trying to use the ArcGIS Online REST API to add a new item of type Map Service. I am successfully able to do this, but I also want to override some properties of the service when I create the item. The "Items and Item Types" section of the REST API docs (ArcGIS REST API ) indicates that when adding an item with "type=Map Service" it's possible to specify a JSON string to override map service properties. I have experimented with this, but can't seem to get it working -- ArcGIS Online seems to ignore any JSON I specify. I have tried specifying the JSON in the "text" parameter posted to the addItem REST end point, and I have also tried specifying the JSON in the body of the HTTP post. In both cases, my JSON seems to get ignored. Ideally I would like to specify JSON that ArcGIS Online injects into the "dynamicLayers=..." parameter of the "export" request it makes to the target ArcGIS Server. What should the format of the JSON be? How do I pass the JSON in the HTTP POST request? (In the "text" parameter?) What service properties is it possible to override? Does anyone have an example? Thanks for your help! Brock
... View more
03-11-2015
05:04 PM
|
0
|
1
|
4369
|
POST
|
Thanks for your response Kelly. Our map service only has one pre-configured layer, and it's just a "dummy" layer so the service isn't completely empty. We do have a bunch of layers, but the only way to access them is through an "export" request with a JSON string specifying the specific layer to draw in a dynamicLayer= parameter. The JSON strings for the dynamic layers do specify some style information, but my main interest in using dynamic layers is to request a layer which is not listed or discoverable any other way. I have the impression from your message that it's not possible to create an ArcGIS Online layer that points to a ArcGIS Server dynamic layer defined by a JSON string. Is that correct? It would be really nice to see this as an enhancement in a future version of ArcGIS Online!
... View more
03-09-2015
02:33 PM
|
1
|
0
|
604
|
POST
|
Hello All, Our ArcGIS Server is configured to support dynamic layers. For example we can request a dynamic layer from ArcGIS Server with a URL like this: http://[server_url]/export?bbox=...&size=...&dpi=...&format=...&transparent=true&imageSR=...&bboxSR=...&dynamicLayers=[dynamic JSON string here] The details of the layer to return are in the JSON string. Is it possible to add a dynamic layer defined via a JSON string as new layer in ArcGIS Online? (I don't see any clear way to add a dynamic layer via My Content > Add Item > Item from the web > ArcGIS Server web service, or through any other means). Any suggestions, or even confirmation that adding dynamic layers isn't possible would be a great help. Thanks, Brock
... View more
03-09-2015
11:24 AM
|
0
|
3
|
5396
|
Title | Kudos | Posted |
---|---|---|
1 | 03-09-2015 02:33 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|