POST
|
I'm using the IdentifyTask that requires a URL of the service. I'm also using IdentifyParam that has an option to return the top layer. Does that mean that I can only return the top lay of the service in the URL? I'd like to be able to dynamically grab the top visible layer, period, regardless of the IdentifyTask URL. Is that possible? I'm using 3.20. Thanks
... View more
05-15-2017
09:57 AM
|
0
|
1
|
909
|
POST
|
Both are real helpful answers. I marked the short and sweet answer as correct only because I went that quicker route. In my Layer.on('error') function, I added a CSS class for the HTML list item to show the failure. Thank you both!
... View more
05-10-2017
05:31 AM
|
0
|
0
|
1067
|
POST
|
Hi, I have a JavaScript function that adds a list item to an un-ordered list when a layer is added to the map through the API. This function call is right after the ESRI add to map function call. This usually works. Even if the layer takes a few seconds to render, the HTML list still shows a representation of that layer. The problem is when the layer cannot be drawn. I've jammed in bad urls for a layer that I'm adding for testing purposes. My layer shows in the HTML list but I'll get an alerted error message after a few seconds that the layer was unable to be drawn. What I'd like to do is still add to my HTML list, but add some CSS (red strike through) to note that there was a problem with that particular layer. What's my best bet? Should I use a deferred promise on the function that adds the layer to the map so that I have a call back method to change the CSS? I ask because I feel like I'm over thinking this. The drawing/adding of a layer on the map looks async so my other code continues and is done by the time I get the alert/error from ESRI.
... View more
05-08-2017
02:49 PM
|
0
|
3
|
1383
|
POST
|
Ah, right, so it works if I spell it right. But, it's just as odd. If I check if isSimple within the geoSvc, it's always true. If I check if isSimple after I draw a rectangle, half the time it's true, half it's false, just as above. I think I'm going to have to check the min/max x/y like John Grayson mentioned.
... View more
04-13-2017
05:53 AM
|
0
|
1
|
807
|
POST
|
The link worked, however, the isSimple method gives me: TypeError: Object doesn't support property or method 'isSimple' TypeError: Object doesn't support property or method 'isSimple'
... View more
04-12-2017
02:24 PM
|
0
|
3
|
1471
|
POST
|
Is that a 3.20 thing? The ref says added in 3.13 but Google doesn't have any results for "geometryEngineAsync issimple 3.20", the ref has no samples and geometryEngineAsync.isSimple (in code) isn't a thing.
... View more
04-12-2017
01:28 PM
|
0
|
5
|
1471
|
POST
|
Yes, but I'm allowing the user to fine-tune their polygons to the decimal point, with input fields. To keep it a rectangle, I'm only allowing them to modify two opposite points (top-left and bottom-right). Using the straight toolbars, you can turn the rectangle upside down and inside out and it won't care. The only issue I have found is updating the graphic with new rings, and finding the right points to edit in the first place.
... View more
04-12-2017
01:06 PM
|
0
|
2
|
807
|
POST
|
Oops, actually... that's just using the draw toolbar. GeometryService.simplify puts everything in clockwise as if it is redrawn? isClockwise is true for every way I draw it, and the ring's points are in different positions compared to the draw toolbar.
... View more
04-12-2017
12:38 PM
|
0
|
0
|
1471
|
POST
|
rscheitlin, kind of weird... if I draw a rectangle while clicking and dragging to the NW, the isClockwise returns true. If I click and drag NE or SW, isClockwise returns false. If I click and drag SE or NW, isClockwise will return true. So, it was a start, but I'm still a little stuck.
... View more
04-12-2017
12:26 PM
|
0
|
8
|
1471
|
POST
|
Robert, I am using a GeometryService.simplify on it to measure. Thank you for directing me at isClockwise.
... View more
04-12-2017
11:45 AM
|
0
|
0
|
1471
|
POST
|
Maybe if I asked this differently. In code I have: toolbar.on("draw-end", addGraphic); The graphic object is passed to addGraphic. To grab the top left point of a rectangle, I have this in code: item.Geometry.Polygon.Rings[0][0][0] = x; // top-left x item.Geometry.Polygon.Rings[0][0][1] = y; // top-left y Since [0][0][0], [0][0][1] is the x, y of the first point drawn (where the user first clicks the map) to begin drawing the rectangle, x, y is not always the top left point of the rectangle. Is there a way to draw, or re-draw, a shape clockwise from the top left most point on the map (that doesn't interfere with the API)? Maybe the best way is to not go by array position but geo-math?
... View more
04-12-2017
11:10 AM
|
0
|
11
|
1471
|
POST
|
I have a draw tool using the draw and edit toolbar classes. The idea is that the user can draw a shape on the map. There is a UI that allows the user to select the drawn shape from a list. There is a context menu to edit the shape. The problem is with rectangle. If the user starts to draw a rectangle and drags down and to the right, everything is fine. The edit UI displays, showing the top left point of the rectangle and the bottom right. However, the user cannot edit the bottom right point, to a point that is north of the top left point with out buggy behavior. In fact, if the once bottom right point (now top right) is edited a second time, the rectangle turns into a line. And, this rectangle to line issue can be replicated by drawing a rectangle upside down. If the user clicks and drags north east, to make the rectangle, the top left point ends up being the bottom left. I hope I explained this well enough. I understand this to be all in how the expected clockwise creation of points of a shape? Is there anything I can do to make cleaner shapes so they can be edited?
... View more
04-10-2017
09:13 AM
|
0
|
16
|
2754
|
POST
|
I would like to download the JS API version 3.20 but do not see a link on SDK Downloads | ArcGIS for Developers Anyone know where it's hiding? Thank you.
... View more
03-29-2017
08:57 AM
|
0
|
2
|
653
|
Title | Kudos | Posted |
---|---|---|
1 | 12-31-2015 06:07 AM | |
1 | 09-25-2015 08:35 AM | |
1 | 12-07-2015 04:32 AM | |
1 | 11-06-2015 07:47 AM | |
1 | 03-28-2016 04:19 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|