POST
|
I had this same problem. By removing <script src="//cdnjs.cloudflare.com/ajax/libs/es5-shim/1.2.4/es5-shim.min.js" /> The error no longer displayed and the map loaded correctly every time, instead of 50% of the time.
... View more
04-27-2015
06:12 AM
|
0
|
0
|
3370
|
POST
|
Interesting, but I don't get how I /use/ a token. I have one, and now need to access a layer via HTTPS. Adding &token=crazylongstringwithlotsofcharacters to the URL doesn't seem to cut it, but I haven't found in the documentation where else to put it. For instance, I believe that once I have a token, I should be able to to into an anonymous/incognito browser window and enter the layer URL I would like to fetch and supply the token somewhere to fetch it.
... View more
09-10-2014
12:42 PM
|
0
|
0
|
391
|
POST
|
Well, the ultimate trick was providing an "f=json" parameter. I was really close. curl -X POST -d username=me -d password=XX -d referer=www.company.com f=json https://www.arcgis.com/sharing/rest/generateToken Which finally returned the response.... {"token" : "-DZuy32O7y40jlKNOTREALLYnorCerffLl5THECGSTy1tUO6zpReAl8nMVb1pI8ccn1lYkR-CEPsDgaSTaZF1U49aoC9B1aObUToKEn2fQJ_ZVYRf_0CSkS-2p1eTIpigoI548k7AVWAQ4x21l-0RHdQQnB1pslpXhpSE.","expires" : 1410382414882,"ssl" : true}
... View more
09-10-2014
11:58 AM
|
0
|
0
|
2343
|
POST
|
The documentation is unclear exactly how to send the username, password, and other parameters in the REST POST. The documentation is here : <ArcGIS REST API > I've tried curl -X POST https:///www.arcgis.com/sharing/rest/generateToken?username=me&password=XX&client=ip&ip=aa.bb.cc.dd curl -X POST -d username=me -d password=XX -d client=ip -d ip=aa.bb.cc.dd https://www.arcgis.com/sharing/rest/generateToken curl -X POST -d @ebody https://company.maps.arcgis.com/sharing/rest/generateToken where ebody is a file containing username=me password=XX client=ip ip=aa.bb.cc.dd and variations on all of them. Does anyone have a working example, or explain what to use for the base url? Does it matter? Sometimes I'll get a 404, other times I get an HTML response: <html> <head> <title>ArcGIS Portal Directory</title> <link href="https://community.esri.com/sharing/rest/files/gw.css" rel="stylesheet" type="text/css"/> </head> <body> <br/> <div class="gwDiv"> <table class="navTable" width="100%"><tr><td class="breadcrumbs">ArcGIS Portal Directory</td></tr></table> <tr valign="top"> <br/><br/> <b> <a href="http://resources.arcgis.com/en/help/arcgis-rest-api/" >API Reference</a> </b> </tr> </table> </div> </body>
... View more
09-10-2014
11:31 AM
|
0
|
3
|
6992
|
POST
|
How can I all a feature's attributes into Javascript? When we use {*} to indicate all attributes, the only info template we can use is ${*}, but that doesn't allow us to add any HTML. The end goal is we need to get all a feature's attributes into some kind of string (json is fine) so we can do something with it. In our case we need to persist it elsewhere. In our page, we don't know which layers a user may select, or what feature they may click on, or even which attributes they'll be interested in. Each layer has unique attributes for its features, so we need to use some kind of wildcard. layerMap[layerObject.name] = new FeatureLayer(each, {
mode: FeatureLayer.MODE_SNAPSHOT,
outFields: ["*"],
infoTemplate: new InfoTemplate(layerObject.name, "${*}")
}); Adding anything to the InfoTemplate screws it up. All we'll get is what we added, none of the key-value pairs.
... View more
03-18-2014
07:00 AM
|
0
|
0
|
779
|
POST
|
I'm missing something. Imagine I have another script on the page that needs to call a function inside the require(). None of the functions inside require() are visible outside of it. For instance, let's say I already have the point or x,y and simply want to map it. If the code with the xys is outside the require(), how can I get the points mapped?
... View more
02-19-2014
11:06 AM
|
0
|
0
|
574
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|