|
POST
|
Hi Gregg. This works but implies a huge change to all logic in our applications. Changing from dynamicservices to featurelayers is a full rewrite of each app.
... View more
01-25-2017
10:05 AM
|
0
|
1
|
2896
|
|
POST
|
So no patch? Really? So 10.5 is a dud release for 3 months? So... maintenance and support gets us on the bug list and a recommendation of "do not install"... I'm out of words...
... View more
01-25-2017
06:41 AM
|
0
|
3
|
2896
|
|
POST
|
@Joseph, just re-read my answer... I'm sorry if I came across less polite... I wrote that in a hurry and it's not my native language... just glad I could help out.
... View more
01-25-2017
04:50 AM
|
0
|
1
|
2896
|
|
POST
|
Joseph this is a different, unrelated problem, and I would suggest opening a new thread. Anyway, you have to add a definitionExpression to your dynamicLayer 9. For instance: https://mappingsupport.com/p/gmap4.php?ll=46.822190,-120.490967&z=6&t=Congressional_district&rest=https://services.nationalmap.gov/arcgis/rest/services/WFS/govunits/MapServer?name=Congressional_district&layers=9&transparent=true&layerDefs={"9":"STATE_NAME='Washington'"}&dynamicLayers=[{"source":{"type":"mapLayer","mapLayerId":9}, "definitionExpression": "STATE_NAME='Washington'","drawingInfo":{"renderer":{"type":"simple","symbol":{"type":"esriSFS","style":"esriSFSSolid","color":[255,0,0,255],"outline":{"type":"esriSLS","style":"esriSLSSolid","color":[0,255,0,255],"width":2}}}}}] That works.
... View more
01-25-2017
03:12 AM
|
0
|
3
|
2896
|
|
POST
|
Gregg, yes it seems that way. What I feel most scary is the absence of awareness or communication from esri. If you look at the bug description it seems unaware of any critical level assessment. It's just one more bug to the pile. Also, how can we shout out to someone from esri to this thread? Maybe using some name tags will work? jskinner-esristaff nicolaraluca odoe
... View more
01-24-2017
11:25 AM
|
0
|
2
|
3124
|
|
POST
|
Hi there Lorenzo. I really think esri has to increase this bug priority. This is going to bubble up in many, many applications. I am amazed geonet is not buzzing with people complaining about this. I don't have a solution for the issue with identify request... it's the same thing but there's no specific event to that request. I don't think request.setRequestPreCallback(callbackFunction) works with identify but I haven't tested that (it doesn't work with export request for sure). What might work is to use dynamicLayers in identifyParameters instead. I know this works in export, so it must also work with identify. You can specify pretty much everything you want with dynamicLayers, like the definitionquery, symbology, etc. It's pretty complicated though, but there are samples out there. Another option I thought of when searching for a solution to the initial problem was to use a proxy that just corrects the layerDefs parameter in every request that passes through it. You can easily modify esri's proxy to do that, and use the proxied url instead of the direct mapservice url. I think this is the easiest way and also the broader solution because it will catch and correct every request you send its way. But the only *perfect* solution has to come from esri. So my best advice is to get them on the phone.
... View more
01-23-2017
11:20 AM
|
3
|
1
|
3124
|
|
POST
|
Jordan, I haven't tested the code properly and some scenarios I don't know what happens to layerDefs, like when it changes many times as the user operates the web app. But if you get to create your module would you consider sharing? Thanks.
... View more
01-16-2017
07:39 AM
|
0
|
3
|
6042
|
|
POST
|
Jordan, you'll have to write down all your configurations and recreate everything in 10.3. This includes server configs like datasources and security, and services. I think there are scripts that export services configs to help out a bit. Search online... I have found another workaround that is not very elegant but works, by adding a few lines to your web app: dynamicMapServiceLayer.on('update-start',function(evt) {
console.log("Original layerDefs:" + evt.target._params.layerDefs);
if(evt.target._params.layerDefs.charAt(0) !='{') {
//if not json syntax, convert
evt.target._params.layerDefs = evt.target._params.layerDefs.split(':').join(':"').split(';').join('",') + '"';
evt.target._params.layerDefs = '{' + evt.target._params.layerDefs + '}';
}
console.log("Corrected layerDefs:" + evt.target._params.layerDefs);
}); Just replace dynamicMapServiceLayer with your variable name. Place this code right after creating your layer. Esri could/should come up with something better, like an override for the little piece of code that's building the wrong layerDefs syntax.
... View more
01-14-2017
12:59 PM
|
2
|
8
|
6042
|
|
POST
|
Don, thanks very much for posting this. though the "workaround" is really more a "do not use". i am always amazed thinking how this kind of bugs keep getting through QC to releases. Exportmap is just the most used and fundamental request to the server... And the time it takes to solve... usually more than 12 months. If anything like this would happen, say with iis, I would expect a patch within days... but I think this time it´s really a huge bug that will really kill 10.5... so maybe a new js API release/patch might just appear quickly. anyway, back to the past release...
... View more
01-12-2017
01:30 PM
|
2
|
0
|
6042
|
|
POST
|
Hi Don, good to know I'm not alone, though being a bug is alarming... It seems to me every js app that needs to turn on/off change querydefs of layers will not work with a 10.5 server. That's a huge oversight if you ask me... You can convert your example to json but it will only work using a direct request to the rest api, not using the js api. Your example would be: {0:"POPULATION > 5000000", 5:"AREA > 100000"} You can see what's going on by copying the request in the browser's console. The request will end with a parameter like f=image. If you change this last parameter to f=html you will see a page where you can change all parameters including the querydefs. This however it does not solve the problem: js api 3.9 does not comply with 10.5 server requiring a json string in querydefs. It's the js api responsibility to turn your programming into correct rest requests. The only way out I see is to roll back 10.5 to 10.4, and wait for a compliant release of js api. Rolling back has to be done manually: you have to write down every service configuration, every server configuration, and then recreate everything by hand. Unless you made a backup of your last configuration before upgrading to 10.5. Anyway, a huge oversight from esri, and a huge loss of time and amount of problems for us. If you hear anything positive from esri please let me know. EDIT: it just now occurred to me it could be a bug with 10.5 server, accepting the wrong syntax in the layerdefs parameter, and not with the js api... also, I seem to remember an old solution where there was a way in the js api to edit the request before it was sent, correcting whatever was needed to make it work.
... View more
01-11-2017
01:44 AM
|
0
|
3
|
6042
|
|
POST
|
It seems REST API in 10.5 deprecated simple sintax on layerDefs: ArcGIS REST API Simple syntax is not supported as an expected value for layerDefs parameter starting 10.5. This is pretty hidden in the documentation by the way... As a side effect, it seems imageparameter.layerDefinitions no longer works since it still translates requests to the simple sintax: ImageParameters | API Reference | ArcGIS API for JavaScript 3.19 In our server we get an error when debugging http requests on the browser's console: {"error":{"code":400,"message":"Invalid 'layerDefs' is specified","details":[]}} Our code is pretty simple and worked last week against a 10.3 server. Can anyone reproduce and confirm this? EDIT: Just to add that the simplest sample from esri does not work against a 10.5 server: Layer definitions on a dynamic map service | ArcGIS API for JavaScript 3.19 It seems a bug to me... I wish I'm proven wrong... Thanks.
... View more
01-10-2017
10:14 AM
|
7
|
44
|
23566
|
|
POST
|
it seems there are things that should be simpler... and easier... The 1st option of requesting using the rest api does not work if it was disabled which many people do. The 2nd option may work. It is such a long winded workaround I'm suprised anyone ever thought of that... I'm going to give it a try. But it really is strange you cannot just tweak a renderer, eg change 1 color. You have to build an entire new renderer, and disregard completly what the author of the map intended for the symbology of the layers. It's just awkward...
... View more
11-16-2016
12:18 PM
|
1
|
0
|
2018
|
|
POST
|
Sorry for the delay... Thanks for your answer. It seems you're correct. I'll have to check what workflow creates this column. Somehow I was convinced that just converting between st_geometry and pg_geometry would still support curves in the shape column... seems not.
... View more
04-21-2016
09:32 AM
|
0
|
0
|
3574
|
|
POST
|
Ok, one solution: 1) some how get line_id into the points (create routes, and locate points along routes, or manually with/without attribute assistant) 2) use this Rank Script with line_id and MEAS to order and number your points along the lines: Ranking field values | ArcPy Café
... View more
04-21-2016
04:51 AM
|
0
|
0
|
2154
|
|
POST
|
Well, I'm not sure about the spatial join... The objective is to number points along a line, from 1,2,3... Then, when a new line starts, number points along this line again with 1,2,3... Almost all points snap to lines. There are points in the intersect between lines, but I can correct those with an attribute like line_id. What's your idea?
... View more
04-21-2016
01:37 AM
|
0
|
0
|
2154
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 04-25-2023 03:27 AM | |
| 1 | 03-06-2020 05:31 AM | |
| 1 | 04-18-2016 10:27 AM | |
| 1 | 11-16-2016 12:18 PM | |
| 1 | 01-21-2016 10:09 AM |
| Online Status |
Offline
|
| Date Last Visited |
12-02-2025
09:57 AM
|