POST
|
Actually, one last question: is there a way to initialize the Legend widget so that it has its display set to 'none'? Currently, the map loads and the "No legend" box is present until the user changes scales. I'm having trouble accessing the display property when creating the Legend widget. Thanks again for the help!
... View more
01-16-2018
11:38 AM
|
0
|
2
|
903
|
POST
|
I originally wrote some code using the 4.3 Javascript API to make the Legend widget visible only at certain scales of the map view: var legend = new Legend({ view: mapView, layerInfos: [{ layer: myLayer, title: "My Title" }], visible: false }); mapView.watch("scale", function(scale) { if (scale > 1500000) { legend.visible = false; } else { legend.visible = true; } }); When using version 4.3 of the Javascript API, this code works: the Legend changes its visibility at the appropriate scale. When using version 4.6 of the Javascript API, this code breaks: the Legend always remains visible, but switches between displaying the layer properties and displaying "No legend," rather than disappearing as it did before. How can I mimic the functionality of 4.3 in version 4.6? Thanks for the help! Philip
... View more
01-16-2018
10:50 AM
|
0
|
5
|
1490
|
POST
|
So it turns out it was an easy fix: I just had the wrong watch set! Changing it from "change" to "center" correctly triggers the kind of symbology change I was looking for. Does anyone know if this functionality can be applied to MapImage sublayers, by any chance, or does it only work with Feature Layers? I'd just like to save myself from going down a fruitless rabbit hole if I don't need to. Thanks!
... View more
04-18-2017
08:14 AM
|
0
|
0
|
412
|
POST
|
I'm trying to implement something like the data-driven opacity example shown here demonstrating the use of visual variables in version 4.3 of the ESRI JavaScript API, but with a twist: I'd like to alter the opacity values of the polygons when the user pans around the screen. I've been using the workflow described in this documentation, where you clone the renderer, create (or alter) an opacity visual variable object, then reassign it to the layer's renderer, but it doesn't seem to have an effect. What am I doing wrong? I expect the layer to be rendered using the new visual variables when the map is moved, but it doesn't look like the renderer has been altered in any way, or if the renderer has been altered, the polygons are not displayed any differently than before. Is this the correct workflow? Do I need to be adding a new, modified layer to the map and removing the old one? Here's the code I'm adding to the example at the very end of the script tag, just after the legend is added to the map view: view.watch("change", changeOpac);
function changeOpac() {
var newRenderer = edLyr.renderer.clone();
newRenderer.visualVariables = [{
type: "opacity",
field: "EDUCBASECY",
stops: [{value: 300, opacity: 0.1},
{value: 750, opacity: 0.9}]
}];
edLyr.renderer = newRenderer;
} Thanks for any help you can provide!
... View more
04-17-2017
11:20 AM
|
0
|
1
|
1246
|
POST
|
That did it! The datasets were being viewed as having a custom projection, when I needed them to have EPSG 3517 (or in ESRI-speak: "NAD_1983_NSRS2007_StatePlane_Florida_West_FIPS_0902_Ft_US"). Defining the projection of the rasters as mentioned above solved the problem. Thanks for your help, Melita!
... View more
02-09-2017
11:00 AM
|
2
|
0
|
623
|
POST
|
I've created a mosaic dataset in ArcGIS 10.3.1 with a spatial reference that uses the D_North_American_1983_HARN datum, as shown: I then add raster datasets with a spatial reference that uses the D_NAD_1983_NSRS2007 datum, as shown: I then select the NAD_1983_HARN_To_NAD_1983_NSRS2007_1 Geographic Transformation within the mosaic dataset default properties menu. However, when I analyze the mosaic dataset, I get the following error (70116): Am I using the incorrect geographic transformation? If so, which should I use? (and do I need to use more than one? If so, I understand that I'll need to Project the original data) Or is there something blazingly obvious that I'm missing here? I wouldn't think that the difference in units is an issue, but I'm happy to be wrong if that will fix the issue. Thanks for any and all help you can provide!
... View more
02-08-2017
08:36 AM
|
0
|
2
|
1338
|
POST
|
I was able to build the tile cache correctly using ArcGIS for Desktop, then transferred it to AGO as described in the link provided by Jayanta. As I can't rely on AGO to tile the data correctly, I'm going to be using this workflow in the future. Once again, thanks for you help!
... View more
08-25-2016
07:21 AM
|
1
|
1
|
908
|
POST
|
Good eye. Thanks for catching that! There doesn't seem to be anything I can do, then. Is this is a bug with tiling in ArcGIS Online? In the meantime, I'll definitely be using the techniques in your link to try and get around the issue. I'll try and post back if I get the tiled service working correctly. Thanks again!
... View more
08-24-2016
11:59 AM
|
1
|
2
|
908
|
POST
|
Thanks for the fast response! The cache status reports that 100% of the tiles are present: And no errors are reported in the Job Status window:
... View more
08-24-2016
11:31 AM
|
0
|
4
|
908
|
POST
|
I have a 5ft resolution DEM that is currently stored as a mosaic dataset with overviews. I am trying to publish it as a hosted map service in AGO. When I do, I keep all of the default settings; the caching options are shown below: After the service is published, these same scales are listed in the Manage Map Server Cache Tiles tool display: Given these results, I assume that I should be able to see the cache when zoomed in to, say, 1:5,000. However, this is not the case. When I zoom in beyond 1:13,542, the entire service turns black. Here is the service in ArcGIS for Desktop 10.3.1 at 1:13,542: Here is the same service at 1:13,541: The same thing happens when I open the service in MapViewer. What is going wrong? Am I misunderstanding how scales work with caches? Does it have something to do with the fact that the information is being stored in a mosaic dataset? What piece of the puzzle am I missing? Thanks for any and all help!
... View more
08-24-2016
09:56 AM
|
0
|
6
|
1650
|
POST
|
Never mind: found the solution on this post. You can get the code here. Or just work the logic into your script; it's not difficult.
... View more
05-27-2016
11:50 AM
|
0
|
0
|
593
|
POST
|
I'm having the same problem in version 10.3.1. Did you ever figure out how to fix this problem?
... View more
05-27-2016
11:41 AM
|
0
|
1
|
593
|
POST
|
Thanks for that link, Dan. It turns out that scrapping the problem mosaic dataset and simply starting again from scratch solved the issue. I'm still not clear why this occurred, but thankfully it was an easy fix!
... View more
04-25-2016
09:16 AM
|
0
|
1
|
344
|
Title | Kudos | Posted |
---|---|---|
1 | 11-02-2015 10:00 AM | |
2 | 02-09-2017 11:00 AM | |
1 | 08-25-2016 07:21 AM | |
1 | 08-24-2016 11:59 AM | |
1 | 11-06-2015 10:26 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|