POST
|
Sorry, It is my copy/paste that is incorrect - I tried to simplify the example by removing lines, and adding newlines. The key thing is the trailing colon (:) in any field name. The response Json looks correct (e.g. "Comments:":"Null") but this gets interpreted as "Comments"::"Null".
... View more
11-04-2015
04:10 PM
|
0
|
0
|
322
|
POST
|
I am getting the above error (init.js:919 API v3.14) identifying a feature in a javascript map viewer, when calling `infoWindow.setFeatures(featureSet);`. The problem is caused by a map service having field aliases with trailing colons in them. The following is part of the json returned from the map service query (geometry removed). I can see the problem, but not sure how to go about fixing it? Is it caused by the json deserialization, serialization by the REST API (10.3.1 server), or a bug in the javascript API? If I only choose outfields that have no trailing colon, it works. I have no control over the offending map service. { "results":[{ "layerId":37, "layerName":"Waste Water Lateral", "displayFieldName":"Unit ID:", "value":"NP-MANGO0131SL/1", "attributes":{ "OBJECTID":"2474425", "Depth":"0.6", "SHAPE":"Polyline", "Install":"Null", "Unit ID:":"NP-MANGO0131SL/1", "Owner:":"W&W", "Asset ID:":"115807", "Comments:":"Null", "NPDC_VECTOR_SDEADMIN_SVEW_WWLATERAL_area":"NP", "SHAPE_Length":"8.117518" }, "geometryType":"esriGeometryPolyline" // geometry removed } }]
... View more
11-04-2015
01:39 PM
|
0
|
2
|
2585
|
POST
|
If I get some time, I will try to document this in detail but the overall solution is outlined above. The key thing is using the proxy.ashx and proxy.config files supplied by ESRI, and enabling proxy usage in your Flex widgets. Then all map service requests are passed via the proxy.ashx file where you can verify user authentication, request a token, and pass on the requests to ArcGIS Server.
... View more
01-30-2014
07:46 AM
|
0
|
0
|
319
|
POST
|
Answering my own question... my initial approach was wrong. There is no way of passing the token as a query parameter to the Flex Viewer app. The solution was to have my application proxy requests from the Flex Viewer application - I just copied the proxy.config and proxy.ashx files to the root of my app. The user first authenticates via the web app (forms authentication), and then a link to the Flex Viewer is loaded. The map service requests are sent from the Flex Viewer to my web application (had to configure the Flex Viewer and widgets to use a proxy). The web app then checks that the user is authenticated, before dynamically requesting a token from ArcGIS to accompany the original map service request.
... View more
10-13-2013
09:29 PM
|
0
|
0
|
319
|
POST
|
I am authenticating a user via a web app, and wanting to pass an authentication token to a Flex Viewer that was created using the "flex builder?". I am not at all familiar with flex, but have managed to build java-script viewers embedded in web applications in the past. However, in this case, someone has built a flex viewer that I need to link to. My web app gets a token from arcgis, and can access the underlying map services directly, but how do I link to the flex viewer without it having to prompt the user for the map service credentials again? Is there a way of passing the token as a url parameter, or do I have to write custom flex code to communicate with my web app?
... View more
10-10-2013
10:53 AM
|
0
|
4
|
2283
|
POST
|
One problem I have up against is that the definition query is visible in the source. For example (using your example) if I had a user that was only allowed to see the features in "Country=USA", they could change the definition and get to see other data. I have no way of stopping this. The only way around this that I can think of is to have a layer for each country (in this case).
... View more
07-31-2013
05:14 PM
|
0
|
0
|
404
|
POST
|
Thank you. It is reassuring to know I am on the right track. My JavaScript skills are not great but it looks like they are about to improve 🙂 What do you mean by "storing the layer definition in session"? Do you just mean the actual query string? I have several layers that have layer definitions defined (basically the same query). The data sets are not huge so this has worked OK for me to date.
... View more
07-30-2013
11:40 AM
|
0
|
0
|
404
|
POST
|
I am trying to establish a way of partitioning layers based on a user/role in a web viewer. I currently have a web application (.Net MVC) that has an embedded map. I use the current authenticated user together with layer definition queries to get the "appropriate" data for that user. This allows me to have a single map service with all data in it, yet control visibility/access on a per user basis. This works fine, but now I have been tasked with getting a generic web viewer (JavaScript) working in the same way. Worst case scenario is creating a web viewer (and maybe map service) for each role but I suspect there is a better way. I have been trying to find examples without any success. Maybe my approach is wrong. Can someone point me in the right direction?
... View more
07-29-2013
06:04 PM
|
0
|
5
|
888
|
Online Status |
Offline
|
Date Last Visited |
05-10-2021
03:23 PM
|