|
POST
|
I've got an otherwise functional version of this sample: http://jsbin.com/ILAYUNeK. But I'm also seeing this issue in the ArcGIS.com maps, including this one. In this map, the counties are rendered based on the single precision PercentVacantHousingUnits field. According to ArcMap, the value in this field for Loudon County (the county that's not displayed) is 8.741081. The legend in the map shows the bottom cut off value for lowest class is 8.7411. I'm not sure if that degree of rounding is just in the legend display or if it's the actual minimum value of the class. I'm guessing the latter is the case since it's not displaying. This same problem is occurring in my 'from scratch' JS map as well that's based on the sample above. Is this a know issue? Is there a work around? Is the code in this post a 'patch' to this problem? This seems to be a bug. If it is, has anybody submitted a ticket for it? I imagine that many other people could be impacted by this problem - thematic mapping is a common use of web maps. Thanks in advance for any insight.
... View more
12-16-2013
12:08 PM
|
0
|
4
|
1992
|
|
POST
|
Thanks for the response, John. Just a suggestion: add the ability to have tile layers on top of feature and graphic layers. Base map tiles are very valuable because you don't have to manage all of the streets, political boundaries, etc. But they become less practical when you need to overlay thematic polygons on top of them - they become harder to read. Being able to overlay transparent tiles that have opaque line features and labels would alleviate this problem. I think there are a huge number of use cases where this would be helpful. Our current work around is to use the Stamen 'Toner' map tiles. The black is so dark that the labels show up underneath semi-transparent polygon layers well. Here's how we are adding them to our maps: var stamenToner = new WebTiledLayer("http://tile.stamen.com/toner/{level}/{col}/{row}.jpg", {
"copyright": "Map tiles by <a href=/\"http://stamen.com\">Stamen Design</a>, under <a href=\"http://creativecommons.org/licenses/by/3.0\">CC BY 3.0</a>. Data by <a href=\"http://openstreetmap.org\">OpenStreetMap</a>, under <a href=\"http://creativecommons.org/licenses/by-sa/3.0\">CC BY SA</a>.",
"id": "stamenToner " Thanks again!
... View more
12-13-2013
09:11 AM
|
0
|
0
|
1684
|
|
POST
|
I'm working off of this sample using the 3.7 API. I added my own FeatureLayer's to the map and the sample ran flawlessly. But whenever I introduce a WebTiledLayer, the feature layers are not added to the map or the legend widget. This makes total sense because WebTiledLayer's don't have a legend. So how do I prevent the invalid layers from being sent to the legend widget? I understand that the layerInfo variable lists the layers that should be sent to the legend and that only valid layers should be included. I tried several ways to filter out the WebTiledLayer's in the following block, but nothing worked. //add the legend
map.on("layers-add-result", function (evt) {
var layerInfo = arrayUtils.map(evt.layers, function (layer, index) {
return {layer:layer.layer, title:layer.layer.name};
});
if (layerInfo.length > 0) {
var legendDijit = new Legend({
map: map,
layerInfos: layerInfo
}, "legendDiv");
legendDijit.startup();
}
}); I tried assigning id's to the FeatureLayers's and then filtering those that don't have a matching id: if ((layer.layer.id == "tracts") || (layer.layer.id == "counties")) {
return { layer: layer.layer, title: layer.layer.name };
} No luck. Ideally, I'd like to check whether or not a layer is a featureLayer and if it's not, exclude it from layerInfo. My final app will have quite a number of featureLayers and I don't want to have to check the ID for all of them. Another potential hitch is that I'll be using a select (html dropdown) element to turn certain featureLayer's on and off via featureLayer.show() and featureLayer.hide(). So I'll somehow need to check whether or not a layer is visible and then send it to the legend if it is. I think there's probably no way to do this without checking the layer name/id somehow. Thanks for any suggestions!
... View more
12-12-2013
11:59 AM
|
0
|
1
|
1241
|
|
POST
|
Thanks for another quick and very helpful response, Kelly. I was able to create a 'from scratch' map that functioned as expected.
... View more
12-12-2013
07:19 AM
|
0
|
0
|
1362
|
|
POST
|
I created a MapBox layer on their website that has transparent background and non-transparent streets, street labels and city labels. I'm wanting to overlay this mostly transparent layer on top of some polygon feature layers served via our AGO 'Organizational Account'. I'll eventually add a MapBox base layer. So my 'map stack' will look like the following with the top listed layer on top: Transparent MapBox Layer (streets and labels) Polygon Feature Layer Polygon Feature Layer Opaque MapBox Layer I've read the documentation and found that the first non-base layer called in map.addLayer() draws underneath the subsequent layers called in addLayer. The transparent label layer is rendering in my map, but the problem is that the transparent layer is rendering underneath the the polygon feature layers. This makes me think that the ArcGIS 3.7 JS library forces tile layers under feature layers or other 'operational layers'. Can anybody confirm? How do I get my transparent tile layer to render on top of the polygon layers? Thanks in advance for your help. My code is below <script src="http://js.arcgis.com/3.7/"></script> <script> var map; require([ "esri/map", "esri/layers/WebTiledLayer", "esri/InfoTemplate", "esri/layers/FeatureLayer", "dojo/parser", "dojo/domReady!" ], function ( Map, WebTiledLayer, InfoTemplate, FeatureLayer, parser ) { parser.parse(); map = new Map("mapDiv", { basemap: "national-geographic", center: [-96.541, 38.34], zoom: 6 }); map.on("load", initOperationalLayer); function initOperationalLayer() { var infoTemplate = new InfoTemplate("${NAME10}", "Population (2010): ${TOTALPOPULATION:NumberFormat}"); var tractLayer = new FeatureLayer("https://services2.arcgis.com/Gypl21NmiWS1cM7h/arcgis/rest/services/ThreeDemographicMaps2/FeatureServer/2", { mode: FeatureLayer.MODE_ONDEMAND, outFields: ["*"] , infoTemplate: infoTemplate }); var infoTemplate2 = new InfoTemplate("${NAME10}", "Percent Black: ${PercentBlack:NumberFormat}"); var countyLayer = new FeatureLayer("https://services2.arcgis.com/Gypl21NmiWS1cM7h/arcgis/rest/services/CountyDemographics3/FeatureServer/0", { mode: FeatureLayer.MODE_ONDEMAND, outFields: ["*"], infoTemplate: infoTemplate2 }); var mapBox = new WebTiledLayer("https://a.tiles.mapbox.com/v3/xxyyzz.ghbjgh0h/{level}/{col}/{row}.png", { "copyright": "<a href=\"http://www.openstreetmap.org/copyright/\">OpenStreetMap and its contributors</a>", "id": "MapBox" }); map.addLayer(countyLayer); map.addLayer(tractLayer); map.addLayer(mapBox); map.infoWindow.resize(155, 75); } }); </script>
... View more
12-12-2013
07:09 AM
|
0
|
2
|
3261
|
|
POST
|
Thanks for the very quick and very helpful reply. Your sample helps us get our first part of the project rolling nicely. I think that would make a very good example to add to the Samples page on the ArcGIS JS API Another question, though: do we have to put our feature service layers into a AGO map to add them to a JS map? It seems to me that we should be able to reference individual layers since we can view all of the REST endpoint data for them. Any examples on doing that? Thanks again!
... View more
12-11-2013
04:44 AM
|
0
|
0
|
1362
|
|
POST
|
We have an organizational account. I've created a feature service that shows the same census tracts symbolized different ways (this is just a test scenario). For each layer in ArcMap, I set up the class breaks symbology and turned off the fields that I didn't want to display. Then I published the service to AGO and shared the service definition and features with "everyone". The service is accessible here - at least for now; we'll probably remove this particular demo once we have something working: http://www.arcgis.com/home/item.html?id=deeafd46294240a49f06c8e84e8f09b0 Now we want to be able to display these three layers on top of a basemap (likely one of the ESRI-provided base maps) and allow the map users to toggle the individual layers. But we don't want to do this in the 'canned' AGO maps -- we don't want to embed this: http://bit.ly/JceTvp. We want to create javascript map with some check boxes to toggle the layers on and off, much like this sample. I understand that there is a difference between a ArcGISDynamicMapServiceLayer and a FeatureLayer. I've also unsuccessfully tried to create a simple JS map with one base map layer and one of these feature layers. Are there any good and complete examples that show how we might do this. Is this even possible with AGO feature services and JS? Ultimately, we'll need map div's on several web pages that will discuss various demographic and other regional indicators.
... View more
12-10-2013
12:33 PM
|
0
|
4
|
1484
|
|
POST
|
I started with this sample on the ArcGIS JS page. Then I switched the overlay layer to this web service on AGO. I made the following changes changed the layer type from FeatureLayer to ArcGISDynamicMapServiceLayer changed the field names to what's listed in map service metadata The overlay layer is displayed on the map, but no info window pops up when I click on the tract / block group. I tried: adding "esri/layers/ArcGISDynamicMapServiceLayer" to the require statement adding "ArcGISDynamicMapServiceLayer" to the map 'function' But the overlay layer wouldn't display at all - I removed them If I download the layer file from the metadata and open it in ArcMap, I'm able to click the features and view the attributes, which suggests/confirms that the map service is capable of returning attributes. I looked at the other examples of some sort of info window or pop up, but they all contain a FeatureLayer. How do I provide the user with some sort of info / identify pop up when they click on the overlay? I've uploaded my modified HTML document as a zip file. Thanks for an insight you can provide
... View more
11-14-2013
09:28 AM
|
0
|
0
|
617
|
|
POST
|
I am experiencing this too. Yesterday the trace tool worked. Today it doesn't. Same MXD, same map layers. Source polygons are in SDE, target polygons in a personal geodb. 10.0, sp2
... View more
12-07-2011
11:35 AM
|
0
|
0
|
3224
|
|
POST
|
I'm using ArcGIS 10 SP2 and I encountered a problem with the join table tool today (9/9/11). This problem occurred when rerunning the model from the model builder window, not when running the model from the dialog that opens when you double click the model in a toolbox. My model crashed downstream of the join tool due to an error of mine in the calculate field tool. So I closed the dialogue that prints all of the data from the geoprocessing model as it runs and returned to the model builder itself. I corrected the error in the calculate field tool and validated the model so I could re-run it. But the join tool and everything downstream turned white - indicating an error at the add join tool. I double clicked the add join tool and the red error symbol was present in the add join dialog box. When I hovered over it, it reported that the join table was already joined to the target feature class. It seems to me that the validate model process doesn't clear out joins from previous sessions. I think it should. When you validate an entire model, it's going to run from the very beginning next time that you run it. So shouldn't model builder detect this and remove all of the joined tables as it validates the model? I also tried saving, closing, and rerunning the model - no dice. So I closed and restarted ArcCatalog, thinking that something in memory was hanging onto the join. No dice. Then I added the remove join tool immediately upstream of the add join tool and that worked. Of course, I had to remove it for subsequent runs of the model. This seems like a bug to me, but maybe I'm missing something. I hope this helps anybody who is encountering a similar issue.
... View more
09-09-2011
11:00 AM
|
0
|
0
|
3734
|
|
POST
|
Because VBA support is about to end, we are having to update a few apps that ran in VBA. They currently run against personal geodatabases that are beginning to get bogged down with too many records. The apps are very table intensive with only a few spatial operations that are needed (geocoding, append, overlay). The application, which is only run once a month to update the database with new data sent to us from third parties, uses a large number of SQL statements to maintain and update the data via ADO. Then a few geoprocessing models are called when needed. This approach works very well and we'd like to continue forward with it. This VBA --> VB.net migration presents an opportunity to move the data into a Personal ArcSDE database on SQL Express. The SQL Express feature class will NOT need to be versioned because I am the only person who edits the data. After the monthly script has been run to import and process newly acquired data, it is pushed to an Oracle SDE database. Some of the existing data gets updated during this process (a certificate of occupancy is issued on an existing permit). Currently, we start an edit session in ArcMap, delete ALL of the features in the Oracle SDE database, then use the append tool to append ALL of the features from the personal geodatabase to the Oracle feature class (the schema are identical). So this seems like a good opportunity to incorporate geodatabase replication into our process so we don't have to delete and then append all of the records each month. But what happens when we extensively edit the data in the SQL Express geodatabase using ADO/SQL and no ArcObjects or geoprocessing models? Will the replication system be aware that some records/features have been added and/or updated? Will these changes be pushed to the Oracle geodatabase? Thanks, Alex
... View more
11-17-2010
04:35 AM
|
0
|
3
|
1270
|
|
POST
|
Did you ever find out how to do this? We have a command/button that is used by many people in our office and we would like to be able to call it from an extension add-in. Thanks, Alex
... View more
09-29-2010
10:12 AM
|
0
|
0
|
1236
|
|
POST
|
I need a programatic way to select polygons whose centroid are inside a search polygon. But looking up esriSpatialRelEnum in the help files doesn't seem to give that option. esriSpatialRelWithin and esriSpatialRelContains will not work in my case. Using ArcObjects, is there another way to do this spatial selection other than ISpatialFilter:SpatialRel = <one of the esriSpatialRelEnum values> ????? Thanks! AZ
... View more
08-17-2010
12:30 PM
|
0
|
2
|
3644
|