BLOG
|
The State of Minnesota has some map accessibility guides we made available to the public late last month. In particular, one of our guides, Static maps, specifically mentions maps and tagging in PDFs. Hopefully that in addition to some of Klara's notes above help! https://mn.gov/mnit/about-mnit/accessibility/maps.jsp
... View more
04-15-2019
08:08 AM
|
2
|
0
|
905
|
POST
|
Jon, thank you for your reference here. I was going down a rabbit hole trying to ensure a layer that was added in using the addLayers method: map.addLayers([layerName1, layerName2, etc...]); When all that was needed was to ensure the last drawn (top layer) was loaded last in the list. I am however still making use of the map.reorderLayer(layerName, layerIndexPosition) function for other layers to sit on top of the "initially" loaded layers, which is really useful. Ultimately though I wish out-of-the-box the Esri JS API would collect the layer position number somewhere. I did some investigating, but was unable to see where the information resided. IMO, why should the developer have to create additional code to store something that seemingly is maintained in some manner behind the scenes? Has anyone done investigation to see if this issue is resolved in version 4? In my initial R&D I wasn't able to find a solution.
... View more
01-09-2019
10:55 AM
|
0
|
0
|
195
|
POST
|
How did you get into the business of cartography and maps? Has cartography always been of interest, or was it something you discovered later on in life? What is your fondest cartography memory from your own work, or someone else's work that has inspired you? What is your favorite map of all-time, historic or recent? What piece of work that you created are you most proud of, and why (cartography or otherwise)?
... View more
05-11-2018
09:44 AM
|
7
|
10
|
53
|
POST
|
Thanks for the tip, Rickey! Were the messages from the main Esri Twitter account (@Esri), DevSummit account (@EsriDevSummit), or various accounts intermixed throughout the week?
... View more
02-01-2018
10:56 AM
|
3
|
1
|
67
|
POST
|
Hi Jay, there are very likely other methodologies to hide a layer from the legend, however the example I have below has worked for me. For example, in one of our applications I hide our aerials when the legend loads into the map since it acts as one of our basemaps. The function loads, as you mentioned, when the layers-add-result event occurs on the initial map load (so a one time on load event), like so: myMap.on("load", function () { myMap.on("layers-add-result", loadLegend); } The loadLegend function uses defined id names, and in the case below fsa2015, which can be defined for any layer type (e.g. FeatureLayer, ArcGISDynamicMapServiceLayer , ArcGISTiledMapServiceLayer, WebTiledLayer, etc.) like so: var fsa2015 = esri.layers.ArcGISTiledMapServiceLayer("url", { id: "fsa2015" }); The loadLegend function is below, using the defined id name. Note: Dependencies, which you also mentioned, include: dojo/_base/array ( arrayUtils ) and esri.diji.Legend : function loadLegend (evt) { var layerInfo = arrayUtils.myMap(evt.layers, function (layer, index) { if (layer.layer.id === "fsa2015") { return { }; } //Hides FSA aerial layer else { return { layer: layer.layer, title: layer.layer.name }; } //Else return as-is }); myLegend= esri.dijit.Legend({ map: myMap, layerInfos: layerInfo }, "myLegendDiv"); myLegend.startup(); myLegend.refresh(); } } In Esri's documentation, layer is required in the layerInfos object, so without it being specified the layer won't load in the legend when active in the map. Hope that helps! More information on the Legend's LayerInfos from Esri's documentation.
... View more
12-27-2017
08:28 AM
|
1
|
6
|
87
|
POST
|
This works as long as the dojo.on module is called first, like so: require(["dojo/on"], function(on) { on . once ( map , "update-end" , function ( ) { // will only fire once... } ) ; }); Thanks for this great tip!
... View more
08-24-2017
01:57 PM
|
1
|
0
|
50
|
POST
|
This was an awesome start to my solution, thanks so much! I needed to generate a click based on a specific point. For example the current map center, like so: //Get the map center point that outputs an object with: type (point), x, y, and spatialReference var currentMapCenter = map.getExtent().getCenter(); //Emulate a click on the map center point map.emit("click", { mapPoint: currentMapCenter });
... View more
07-12-2017
08:21 AM
|
0
|
0
|
109
|
POST
|
Yes, you can remove the basemap once it's added to the map. I was unable to find any resources in the documentation, but after some trial and error was able to do so by calling: map._removeBasemap(); Which is extremely useful if you are using your own custom basemaps with Esri's basemaps. 🙂
... View more
02-15-2017
07:13 AM
|
0
|
0
|
130
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|