|
POST
|
You can get the typings from here: jsapi-resources/4.x/typescript at master · Esri/jsapi-resources · GitHub I'm not sure the exact issue you're running into, or the best way to approach this in general. My feeling is that there is almost certainly a way to use the .js files with those typings but I'd have to play around with it to figure it out I'm sure. Also, what capability do you need to add to the layer list? There may be an easier way to add it on top, at runtime, as opposed to modifying the source code.
... View more
07-03-2017
10:44 AM
|
0
|
2
|
1559
|
|
POST
|
If you use the Identity Manager, you should just need to have the user log in and they should be able to access secure services as their server token will be appended to requests automatically. Here's some more information: ArcGIS Security and Authentication | ArcGIS for Developers
... View more
07-03-2017
10:36 AM
|
0
|
0
|
1811
|
|
POST
|
I think you should be fine using other spatial references than web mercator. If this issue shows up in web mercator as well then it's probably not a spatial reference issue. I believe "generalizedForScale" is what "maxAllowableOffset" is called in the browser, and it does seem to be hardcoded at 4000. I did a search for that property in the API source code and nothing came up aside from where it's set, which makes me think it's not yet supported in 4.XX. I also tried setting the property to see if it changed anything but didn't notice any differences. It might be worth playing with though.
... View more
06-29-2017
01:35 PM
|
0
|
1
|
567
|
|
POST
|
Thanks for the information. I can't replicate this issue, but to summarize what I understand the issue to be: A large set of polygons viewed from a zoomed out perspective (notice the jagged edge of the polygons, presumably this is just due to pixel size): Once I zoom in, the edges straighten: If I take a screenshot right as I zoom in, I can see unstraightened edges before they're redrawn: This seems to be more or less the issue here: that this process is not working for your geometries and (some) of your polygons are not being redrawn as you zoom in and out. As to why that's happening, I'm still fairly clueless. It could be a setting on your feature service I suppose, something like "maxAllowableOffset" as you mentioned. So playing with that setting might be worthwhile, although you may have already tried that. The fact that you mention this issue is worse for larger numbers of polygons makes me think that this may not be the issue though. I'll keep playing around with this though.
... View more
06-29-2017
01:15 PM
|
0
|
3
|
2543
|
|
POST
|
My understanding is that a polygon geometry only has to be delivered to the client once. The changes to the visualization of the polygons as the user zooms in and out should not require additional http requests, that is all handled in the client. I understand what you mean by "It is as if the geometry is being rendered like the camera is far away," but I'm still not sure what the issue is. If you could post an example JSON of one of the distorted polygon graphics (preferable in web mercator), I can try to reproduce to make sure it isn't an issue with the geometry itself. You can try: // after you add the feature layer to the map
view.whenLayerView(featureLayer).then(layerView => {
layerView.queryFeatures().then(features => {
console.log(JSON.stringify(features.map(f => f.toJSON())))
});
});
// or if you're using web map
webmap.then(wm => {
// assuming there's one layer only in web map
view.whenLayerView(wm.layers.getItemAt(0).then(layerView => {
layerView.queryFeatures().then(features => {
console.log(JSON.stringify(features.map(f => f.toJSON())))
});
});
}); to print the features, so I can try reproduce. If we can rule out a problem with the feature geometries, then it's likely something to do with how the feature services are being created.
... View more
06-29-2017
08:58 AM
|
1
|
5
|
2543
|
|
POST
|
I think you could manually move the layer around so that it's the last layer. Another option would be to set the opacity of all other layers to something like .5 so you can ensure that you can see through them at least. Here's how you might approach the first option: var map;
var myFeatureLayer;
var query;
myFeatureLayer.selectFeatures(query, FeatureLayer.SELECTION_NEW, function(event){
if (event.features.length>0){
map.reorderLayer(myFeatureLayer, map.layerIds.length - 1);
}
}); When the features are deselected you may want to change the order of this layer back to where it was previously.
... View more
06-28-2017
07:22 AM
|
1
|
0
|
794
|
|
POST
|
Interesting issue. I don't know a lot about this topic. If you're able to make those services/data public, I'd be happy to play around with them though. If I had to guess I'd guess that this is a projection issue (like you mentioned) as opposed to a max-allowable-offset issue.
... View more
06-28-2017
07:02 AM
|
0
|
0
|
2543
|
|
POST
|
Interesting, I was going off the 4.X API documentation. Here's some relevant information: Esri attribution | ArcGIS for Developers And from the FAQ: Q: Can I remove the Esri attribution from my maps? A: If you use resources from ArcGIS Online no. If you use our map services, you must keep all logos and other attribution on the maps. See this resource for more details on when you can and can't remove the attribution. Q: Am I required to show Esri attribution in my app? A: It depends. Esri requires that when you use an ArcGIS Online basemap, Esri data services, or Esri API technology in your app you must also include Esri attribution. See this resource for more details on when to display Esri attribution. (My personal feelin is that the chances of legal action being taken over this are extremely remote, but it's probably a good idea to stay within the terms of service if possible.)
... View more
06-26-2017
11:25 AM
|
0
|
0
|
6155
|
|
POST
|
You're not supposed to remove the attribution widget for legal reasons. It is a DOM node though, so you can edit it via JS and CSS like any other DOM node. You can find the class by inspecting it using dev tools and select it by the class name.
... View more
06-26-2017
09:21 AM
|
0
|
2
|
6155
|
|
POST
|
in your sample code, you have a variable called params that you're passing in to esri.request. Try adding a key: "outSR" and value: 4326 to params (I assume it's a javascript object).
... View more
06-22-2017
02:07 PM
|
1
|
1
|
3026
|
|
POST
|
You may be able to specify the outSR (out spatial reference) in the request that you make for features. Try adding an { outSR: 4326 } key-value pair to your params object.
... View more
06-22-2017
01:49 PM
|
0
|
3
|
3026
|
|
POST
|
Okay, I think you should create a SimpleRenderer using the symbol you're creating and pass that renderer in to the graphic layer constructor. This will take care of the symbology for each graphic on the layer. In the graphic constructor, use: var graphic = new esri.Graphic(featureSet) Also, what's the spatial reference on your map? There may be a spatial reference issue here as well. It looks like your data uses web mercator x, y. I notice that, in your feature JSON, there is no spatial reference property. Something might be going with that as well. You should check the spatial reference of a graphic after you use the esri.Graphic constructor and see what spatial reference is being assigned.
... View more
06-22-2017
01:33 PM
|
1
|
5
|
3026
|
|
POST
|
Can you show an example of what featureSet looks like?
... View more
06-22-2017
10:09 AM
|
0
|
8
|
3026
|
|
POST
|
My bet is that the best way to do this is with CSS. Figure out the classes of the elements you want to be transparent (right click + inspect element) and set the opacity of those elements with a CSS rule.
... View more
06-21-2017
04:02 PM
|
1
|
1
|
1334
|
|
POST
|
Another option would be to create an SVG image with the number in it, translate it from utf8 to base64, and use it as the url for a PictureMarkerSymbol. Something like: JS Bin - Collaborative JavaScript Debugging This example won't rotate with the map, though. I don't see anything wrong with the way you did it.
... View more
06-21-2017
11:01 AM
|
0
|
1
|
5082
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-03-2017 08:23 AM | |
| 1 | 11-02-2017 08:36 AM | |
| 1 | 11-02-2017 09:23 AM | |
| 1 | 09-20-2017 02:07 PM | |
| 1 | 10-06-2017 05:54 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:24 AM
|