POST
|
In my case, I look only at polygons with a single ring, and I have observed the error there (as the returned point in not a centroid, sometimes being totaly out of a convex pologon.) But in your case, I wonder what the largest ring is: is it the largest in surface, or in number of vertexes? In the second case, you may have an small island with more vertexes that the big land body...
... View more
05-17-2019
09:45 AM
|
0
|
1
|
2940
|
POST
|
We made the Parcel layer public. You should be able to open it now without credentials.
... View more
04-16-2019
09:15 AM
|
0
|
0
|
2940
|
POST
|
I’ve completed a short demo for the getCentroid issue. You may find the code at: https://github.com/Horiatu/Test_GetCentroid/ and execute the application at: https://horiatu.github.io/Test_GetCentroid/ You may need credentials to see our layer service – let us know. When running the “get Centroid” button there is a 50/50 chance to get a(n almost) correct centroid, so, give it a chance: inspect more than one parcel…
... View more
04-15-2019
08:54 AM
|
0
|
2
|
2940
|
POST
|
Yes, but what am I supposed to do? The map is not mine!
... View more
04-12-2019
06:25 AM
|
0
|
0
|
2940
|
POST
|
I get that the code was OK. Now here is some data (one of the center of an extent): geometry: spatialReference: latestWkid: 3857 wkid: 102100 __proto__: Object x: -8986538.660101335 y: 5333501.101999095
... View more
04-11-2019
11:37 AM
|
0
|
2
|
2940
|
POST
|
I have this pice of code: parcels.forEach(parcel => { const centroid = parcel.geometry.getCentroid(); //getExtent().getCenter(); //getCentroid(); const feature = new Graphic(centroid, myUtils.NEW_ADDRESS_SYMBOL); this.map.graphics.add(feature); and I'm getting this result: The centroids are not in center of parcels, and some are outside their parcels. There is no point in publishing all code (I can do that on request), but changing this line: const centroid = parcel.geometry.getExtent().getCenter(); //getCentroid(); for ilustrating the center of the extent of the parcel instead of the centroid give better results: Note that this is not a good solution: I have added the extent for the last two parcels to show that the centre of the extent is not the desired solution, but this is a lot better solution that the getCentroid function the way I got it.
... View more
04-09-2019
07:32 AM
|
0
|
11
|
4809
|
POST
|
Yes, is about JsApi - but 3.x This is the closest post I've found related to my issue. Is not about a Graphic in a graphic layer, but the geometry of a feature. I've found in the mean time a solution, which seems to work well: feature._layer.suspend(); feature.geometry.update(centroid.x, centroid.y); feature._layer.resume(); feature._layer.refresh() however does nothing! for the graphic in the graphic layer, the suggested solution works well: const selectedAddress = this._getMarker("selectedAddress"); selectedAddress.geometry = centroid; this.map.graphics.refresh(); Tx, for your reply.
... View more
03-12-2019
09:33 PM
|
0
|
0
|
6492
|
POST
|
I see refreshing the layer - alright, however, the feature geometry I've just changed does not show in another position until I zoom in (and out.)
... View more
03-12-2019
09:41 AM
|
0
|
2
|
6492
|
POST
|
looks like Kristian Ekenes' replay bellow gives the answer.
... View more
01-31-2019
08:24 AM
|
0
|
0
|
2192
|
POST
|
Is it any indication that esri will ever fully updates popup and popupTemplate funcitonality to what we see in 3.x?
... View more
01-31-2019
07:12 AM
|
0
|
1
|
2192
|
POST
|
Yes: working great! (Please ignore "Also - I'll try this later...")
... View more
01-23-2019
09:34 AM
|
0
|
0
|
663
|
POST
|
Those are great! Is there another one measuring a point? I.E. should return the coordinates of the point; if the map has elevation, should also return the elevation. Also - I'll try this later... - I need all three combined in one panel. The widget should have some configuration options to display or not the mode and the units selectors (with defaults.) (When not displaying the units selector,) should automatically select the multiplier (m, km etc.)
... View more
01-23-2019
07:16 AM
|
0
|
2
|
663
|
POST
|
In FieldInfos of Popup Template some attributes have formats some - don't. For those that have, the format spans on many fields (date format, decimal places etc.) while the format string itself is not a JS format but a proprietary format of ESRI. Is there an API function that converts the attribute value to the format depicted in the corresponding FieldInfo record? (As the question applies to JsApi 4.x, I would not mind the answer for JsApi 3.x)
... View more
01-22-2019
10:06 AM
|
0
|
0
|
404
|
IDEA
|
In JsApi 4.x redefine the functions from JsAPI 3.x that allow to extract the title and the content of the Info Window as defined in the map with Map Viewer application in the popup dialog designer.
... View more
01-21-2019
02:49 PM
|
0
|
0
|
275
|
POST
|
Thanks, Well, as my work order is not to reinvent the wheel (from head of TSG department,) unless there is no other option, may I ask you whom to address this request, if not to you: getTitle and getContent (in whatever form) are very important features. As I've already pointed out, the formats specified in FieldInfo are not JS formats but proprietary for MapViewer and JsApi. There are not only for dates but also for times and numbers. I have already explored the possibility of writing a mixin function that takes in to account the title template, the attributes and the format (when exists) from FieldInfo when I have evaluated the JsApi 3.x. It is work intensive and there is always the possibility to miss some formats. The application cannot know in advance what formats to expect. These functions already exist in the API (for the popup purpose.) The question is: "Is it possible for Javascript API Development to expose them in a further version of the API 4? I'm not in a hurry with my solution - I can wait."
... View more
01-21-2019
09:50 AM
|
0
|
1
|
826
|
Title | Kudos | Posted |
---|---|---|
1 | 10-12-2016 02:01 PM | |
1 | 10-17-2017 12:16 PM | |
1 | 11-26-2015 07:47 PM | |
1 | 03-02-2018 11:28 AM | |
1 | 12-01-2015 02:07 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|