|
POST
|
I am wondering if something changed on the layer swipe widget today? Yesterday everything was working fine. But today I am experiencing the following issue. When I initialize the map I call a function to create the layer swipe widget. It loads and everything works fine. But I have a check box to toggle the swipe tool and a drop down list to select the swipe layer. When either of these are used I call the destroy() method on the widget and create a new widget using the exact same function that creates it in the map initialization. When the startup() method is called this time the slider bar and slider handle is missing. I thought it might have been something I changed that messed it up. But then I noticed the esri sample was experiencing the same issue. http://esri.github.io/arcgis-dijit-layer-swipe-js/ The weird thing is... The layer loads and is positioned correctly and I see the widget is created in Firebug. The other weird thing is when I call destroy(), it removes my swipe div from the dom. swipe widget is there on map load. swipe widget (and hard coded div) are gone after destroy() / startup() sequence. HTML <div id="map" class="tundra" style="overflow: hidden;"> <div id="swipeDiv"></div> </div> <label for="swipeLayer">Swipe Layer:</label> <select id="swipeLayer" style="width: 110px;" onchange="swipeLayer_Changed();"> <option value="CO2014" selected="selected">2014 Aerial</option> <option value="CO2011">2011 Aerial</option> <option value="CO2008">2008 Aerial</option> <option value="CO2005">2005 Aerial</option> <option value="CO2002">2002 Aerial</option> <option value="CO1988">1988 Aerial</option> <option value="CO1973">1973 Aerial</option> </select> <input id="swipeBox" type="checkbox" checked="checked" aria-checked="true" onchange="swipeBox_Changed(this);" /> <label for="swipeBox">Swipe Aerial Image</label> Javascript var swipeLeft = 200; var swipeIndex; var swipeLayers = []; var swipeWidget; var imageDict = {}; var urlDict = {}; var swipeChecked = true; // used in print function to hide swipe layer function initImageDict() { // called in mapinit imageDict["CO2014"] = [CO2014LO]; imageDict["CO2011"] = [CO2011HI, CO2011LO]; imageDict["CO2008"] = [CO2008HI, CO2008LO]; imageDict["CO2005"] = [CO2005HI, CO2005LO]; imageDict["CO2002"] = [CO2002HI, CO2002LO]; imageDict["CO1988"] = [CO1988HI, CO1988LO]; imageDict["CO1973"] = [CO1973HI, CO1973LO]; initUrlDict(); swipeLayer_Changed(); } function initUrlDict() { urlDict["CO2014"] = [CO2014LO_url]; urlDict["CO2011"] = [CO2011HI_url, CO2011LO_url]; urlDict["CO2008"] = [CO2008HI_url, CO2008LO_url]; urlDict["CO2005"] = [CO2005HI_url, CO2005LO_url]; urlDict["CO2002"] = [CO2002HI_url, CO2002LO_url]; urlDict["CO1988"] = [CO1988HI_url, CO1988LO_url]; urlDict["CO1973"] = [CO1973HI_url, CO1973LO_url]; } function swipeLayer_Changed() { require(["esri/dijit/LayerSwipe", "esri/layers/ArcGISImageServiceLayer" ], function (LayerSwipe, ArcGISImageServiceLayer) { if (swipeWidget) { swipeWidget.destroy(); } for (var i = 0; i < swipeLayers.length; i++) { map.removeLayer(swipeLayers); } swipeLayers = []; // initiate the swipe tool if (swipeChecked) { var swipeLayer = document.getElementById("swipeLayer").value; var urls = urlDict[swipeLayer]; for (var i = 0; i < urls.length; i++) { var layer = initImageLayer(ArcGISImageServiceLayer, urlDict[swipeLayer], "swipe" + String(i), 1.0); map.reorderLayer(layer, swipeIndex + i); layer.show(); swipeLayers.push(layer); } swipeWidget = new LayerSwipe({ type: "vertical", //Try switching to "scope" or "horizontal" left: swipeLeft, map: map, layers: swipeLayers }, "swipeDiv"); swipeWidget.startup(); swipeWidget.on("swipe", function (swipeObject) { swipeLeft = swipeObject.left; }) } }); } function swipeBox_Changed(checkbox) { if (checkbox.checked) { swipeChecked = true; swipeLayer_Changed(); } else { swipeChecked = false; swipeWidget.destroy(); for (var i = 0; i < swipeLayers.length; i++) { map.removeLayer(swipeLayers); } } document.getElementById(checkbox.id).setAttribute("aria-checked", checkbox.checked); } Has any one else been experiencing this behavior? I had it working perfectly yesterday. And all I did today was add some aria labels. Maybe I have a syntax error and I am just over looking it. Thanks.
... View more
12-17-2015
02:02 PM
|
0
|
1
|
4391
|
|
POST
|
I am hoping for the same! We are currently using the locator you mentioned in Geocoding Addresses with Apartment Units But that post has so many locator versions uploaded to it, I found it difficult to determine which one to use... I really hope this becomes a priority...
... View more
12-14-2015
08:30 AM
|
1
|
0
|
1626
|
|
POST
|
How am I to use the edit tool to delete the graphic when there is no delete option on the edit tool? According to the documentation, the edit tool only allows the following constants... MOVE, SCALE, ROTATE, EDIT_VERTICES, and EDIT_TEXT
... View more
12-08-2015
02:57 PM
|
0
|
1
|
1486
|
|
POST
|
Steven White seems to have the correct answer. I had the same problem printing graphics layers (and feature layers) that had graphics assigned using RGB colors. I wanted to use RGB so I could set an alpha value to the graphic. As a work around I set the colors using hexadecimal color and just set an opacity value on the graphics layer and / or feature layer.
... View more
12-08-2015
10:02 AM
|
0
|
0
|
1998
|
|
POST
|
Robert Scheitlin, GISP, Not sure how those samples were set up, but I found this issue to occur when deleting graphics using the clear function. I have a graphics layer called drawingGraphicsLayer in which I set up an onClick event to activate the editor tool bar. drawingGraphicsLayer.on("click", function (evt) { dojo.stopEvent(evt); editToolbar.activate(Edit.MOVE | Edit.SCALE | Edit.ROTATE | Edit.EDIT_VERTICES, evt.graphic); }); Here you can see I have drawn an arrow on the map and and activated the editor tool by clicking on the graphic. I have a button to delete all graphics which invokes drawingGraphicsLayer.clear(); If that command is called while the editor tool is activated on the graphic the vertices remain on the screen. I have found that adding the following onClick event on the map will remove the vertices by clicking elsewhere on the map. map.on("click", function (evt) { editToolbar.deactivate(); }); However, it seems like the editor tool should naturally be deactivated on all graphics if they are deleted using the clear function.
... View more
12-08-2015
06:50 AM
|
0
|
3
|
1486
|
|
POST
|
Using the JavaScript API (currently using version 3.15). I draw a graphic on the screen. Then I call the editor tool to edit the graphic. If I delete the graphic while the editor tool is enabled, the graphic disappears, but the edit tool vertices remain on the map. Not sure if this is by design, or just something the developers overlooked. The only way to terminate the edit mode and remove the vertices from the map is to select a different graphic for editing. It seems to me that if the graphic is deleted, the edit mode should be terminated on that graphic naturally.
... View more
12-07-2015
03:22 PM
|
0
|
6
|
4811
|
|
POST
|
I don't know if this is helpful to you or not... But I was having the same issue. My problem was that I had neglected to add the "name" attribute to the file input tag. Fields with an empty/missing "name" attribute are missing in POST/GET request from the browser. So make sure you have the "name" attribute set so the request will include the file.
... View more
12-07-2015
03:00 PM
|
2
|
0
|
562
|
|
POST
|
Thanks Chris Sergent, It looks like you are using the Query Task in that application. Which is exactly what I used as the work around. The Identify Task does not seem to honor the coded domain values. Only the coded domain descriptions.
... View more
07-17-2015
07:57 AM
|
1
|
0
|
2013
|
|
POST
|
Kristian Ekenes, Yes. I am referencing the same field in the Query Task that I tried to reference in the Identify Task. The syntax is a little different though. In the Identify Task... value= results[0].feature.attributes.FieldName; In the Query Task... value= results.features[0].attributes.FieldName; I don't know if it makes a difference or not... but I am still referencing the JS API version 3.6. I hope the functionality hasn't changed in the latest release. (which is currently at 3.14). Another thing I am going to note: There are several places in the map document where I have selected to NOT display the coded value description. I have not done enough testing to know if any of these settings make a difference or not. In the Layer Properties: Display > Expression > Uncheck "Display coded value description" Labels > Expression > Uncheck "Display coded value description" HTML Popup > Uncheck "Display coded value descriptions in all HTML content" In the Attribute Table: Table Options > Appearance > Uncheck "Display coded value domain and subtype descriptions" In ArcMap Options: Customize > ArcMap Options > Uncheck "Display coded value domain and subtype descriptions"
... View more
07-17-2015
07:55 AM
|
0
|
0
|
2013
|
|
POST
|
I was never able to figure out how to receive the coded domain value using the Identify Task. But I found a little work around (hack) to get to the information. I run the Identify Task on the item that gets selected. I grab the OBJECTID returned from that task and then run a Query Task on the OBJECTID. The Query Task will return the coded domain value instead of the description. identifyTask.execute(identifyParams, identifyResults); function identifyResults(results) { var ObjectID = idResults[0].feature.attributes.OBJECTID; query.where = "OBJECTID = " + ObjectID; query.returnGeometry = true; queryTask.execute(query, queryResults); } It's not the best solution, but it works.
... View more
07-16-2015
10:25 AM
|
0
|
2
|
2013
|
|
POST
|
I also tried ArcMap Options Tables. Still no luck getting the coded value.
... View more
07-14-2015
09:16 AM
|
0
|
0
|
2013
|
|
POST
|
When I use the Identify Task on a layer with a coded domain, it returns the coded domain description and not the value. How can I receive the coded value? For example. In our zoning layer... if zoning of SF1 is identified, the callback returns Single Family District... but I want the actual code SF1. I have unchecked all the following boxes in the map document that specify to display the description. Layer Properties Display Expression Layer Properties Label Expression Layer Properties HTML Popup Layer Attribute Table Appearance But the JavaScript API is still returning the description. Similarly, when I identify in the map document, I receive Single Family District and not SF1. Am I missing a setting someplace? or is there a setting in the identify parameters that I am overlooking?
... View more
07-14-2015
09:11 AM
|
0
|
7
|
6450
|
|
POST
|
I would like to hear from ESRI ESRI on this issue. I still have not found a way to put focus on the map and navigate around the map without a mouse. Chris Sergent had some interesting ways to navigate the mouse with the keyboard based on built in operating system controls... However, this solution still requires a mouse and is strictly reliant on the OS to have this feature. What if the user does not have a mouse? What if they can't navigate a pointer on their OS? These are accessibility issues that I am trying to overcome in our web development. Once again, I am looking for a way to navigate the map via keyboard only that does not rely on a mouse being attached to the computer at all. This is part of our WCAG 2.0 AA compliance requirements mandated to us from the Department of Justice. The only way I was able to do this was to add custom zoom and pan buttons on my map that can be accessed by tabbing through the page. See the link below for an example. Tile Index Map | Champaign County GIS Consortium I would prefer if I didn't have to do this customization on every map I publish. Can ESRI please comment on this? Are there any plans for keyboard only navigation in future releases of the JavaScript API?
... View more
07-13-2015
08:34 AM
|
0
|
3
|
1679
|
|
POST
|
Thanks! I will have to do some testing. We are also required to meet these standards for Mac.
... View more
06-25-2015
02:45 PM
|
1
|
1
|
1678
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 08-20-2024 02:08 PM | |
| 2 | 09-20-2023 10:50 AM | |
| 1 | 06-13-2023 11:45 AM | |
| 3 | 01-11-2022 07:33 AM | |
| 1 | 05-25-2022 10:27 AM |
| Online Status |
Offline
|
| Date Last Visited |
a week ago
|