POST
|
I don't think local drive is the answer I am looking for. I want the user to be able to add some graphics to the map and be able to save them so that when they come back to this map they see the graphics they added.
... View more
05-19-2015
06:58 PM
|
0
|
1
|
475
|
POST
|
I was so excited to try this but it did not seem to work. I wish I was smart enough to understand why it is not working or how to add it to a save button but I am not. Any thoughts Advance Draw Tool Guy? BTW - Maybe I was using it wrong. It is my understanding that since we were invoking the editor on the click event that I didn't need to do anything else. However, when I added the code and then drew some stuff and came back in my drawings were gone. I looked at the right click events and don't see where I would do anything else.
... View more
05-19-2015
06:54 PM
|
0
|
0
|
189
|
POST
|
Where do I get the new version from? Any chance you created a save button for the graphics. It is such an awesome tool. I love it.
... View more
05-19-2015
11:41 AM
|
0
|
2
|
1102
|
POST
|
I’ve been challenged to create a project that allows a user to markup a map. They want to be able to do the following: Add text to the map. Add a polygon with the option to show the area of that polygon. Add Points to the map Save the document with these added text, polygons and points. Print the document as a pdf with these graphics. I was using the advanced drawing tool (link below) and modified it to do what I want but then they threw the whole curve ball of wanting to save the changes. Can you save your graphics to a layer? If so how would I do that? I would like to do that if possible using a button like below. <button data-dojo-type="dijit/form/Button" disabled="true">Save</button> Advanced Drawing toolbar link. If you haven’t seen it you should. It is very nicely done. https://community.esri.com/people/timw1984/blog/2014/07/22/javascript-api-advanced-draw-widget
... View more
05-19-2015
11:32 AM
|
0
|
5
|
3959
|
POST
|
Are you using Chrome or IE because I just did a test and everything works fine in Chrome but IE is off for some strange reason. Sadly IE is what our company browser is.
... View more
03-24-2015
11:28 AM
|
0
|
4
|
1102
|
POST
|
What is interesting is that I get this issue using your example as well. Try following a highway at the start I think you will see what I mean. http://jsfiddle.net/timw1984/4p7d241v/17/embedded/result/
... View more
03-24-2015
11:17 AM
|
0
|
0
|
1102
|
POST
|
I'm importing our stores which are in CAD (DWG) files into our ArcGIS system. They are stores and I want them to be in the right location on the map and the right size so that I can use measure and draw tools and get accurate measurement information when I upload them into Server? What is the best way to do this?
... View more
03-24-2015
11:11 AM
|
0
|
0
|
3651
|
POST
|
When I click on the map the actual place it starts to draw or put a text piece is off. It seems to be high and to the right. I've seen this before and believe their is a fix. What am I doing wrong?
... View more
03-24-2015
11:05 AM
|
0
|
0
|
1102
|
POST
|
I am importing our CAD files into ArcGIS so that I can server them up to the JavaScript API using Server. These CAD files do not have any spatial information at this point. What we are doing is really looking at the inside of our stores when zoomed in very closely. I've been tasked to come up with a way to allow our upper management the ability to draw a box that will give them the sqft of that box and be able to either add some data/label to that box or be able to pull some information into that box. In other words show changes to departments that want made to the store over top the CAD drawing. Any ideas/suggestions on how to get going on this project. The measurement tool and drawing tools are nice don't really help me with this problem. Examples are always appreciated. Thanks, Michael
... View more
03-24-2015
07:45 AM
|
0
|
11
|
5613
|
POST
|
I think part of my problem was that at one point we were using the layer title and then in the second part using the Layer.id. I named them different in my real code vs my fiddle example code. Sometimes it is just the simple stuff that is easy to over look. //---Start of remove layer if it exists. for (var i = toc.layerInfos.length - 1; i >= 0; i--) { if (toc.layerInfos[i].title === "StoresResultsLayer") { toc.layerInfos.splice(i, 1); break; } } for (var i = map.layerIds.length - 1; i >= 0; i--) { var currentLayer = map.getLayer(map.layerIds); if (currentLayer.id == 'Stores Results') { map.removeLayer(map.getLayer(map.layerIds)); break; }; } toc.refresh(); //---- End of remove layer if it exists.
... View more
10-09-2014
06:44 AM
|
0
|
0
|
1006
|
POST
|
Here is a simplified fiddle. As you can see it adds in storesresultslayer but if you click the get results more than once you see it in the toc twice. If I try to click the clear results it removes the layer but not out of the TOC. http://jsfiddle.net/y4hwhoge/6/embedded/result/
... View more
10-08-2014
10:49 AM
|
0
|
2
|
1006
|
POST
|
Ok I fixed that and did make sure it is listed as correct answer. Get a little confused on that sometimes sorry about that. My bad. I took a look at the code and this is not working for me which I copied from the original code. Again this is going to be from a separate button that I am calling from <button dojoType="dijit.form.Button" data-dojo-props="iconClass:'dijitIconClear'" onClick="clear();">Clear Results</button> function clear(evt) { //---Start of remove layer if it exists. for (var i = toc.layerInfos.length - 1; i >= 0; i--) { if (toc.layerInfos.title === "StoresResultsLayer") { toc.layerInfos.splice(i, 1); break; } } for (var i = map.layerIds.length - 1; i >= 0; i--) { var currentLayer = map.getLayer(map.layerIds); if (currentLayer.id == 'StoresResultsLayer') { map.removeLayer(map.getLayer(map.layerIds)); break; }; } toc.refresh(); //---- End of remove layer if it exists.
... View more
10-08-2014
09:53 AM
|
0
|
3
|
1006
|
POST
|
Ok so technically no but that code does not remove it from the TOC. It was part of my original question but it did not do everything. However, it helped me with a couple of big questions like adding a dynamic layer with certain layers with a filter. So I marked it answered. Plus the function I am using is on a different button that clears all results from the map and clears out all of the text boxes and such. So my problem is that if the layer exist I can remove it from the map but not from the TOC. for (var j = 0, jl = map.layerIds.length; j < jl; j++) { var currentLayer = map.getLayer(map.layerIds ); if(currentLayer.id == 'StoresResultsLayer'){ map.removeLayer(map.getLayer(map.layerIds )); }; };
... View more
10-08-2014
09:12 AM
|
0
|
5
|
1006
|
POST
|
I am using the following code to remove a layer from javascript map but how do I also remove it from my toc? for (var j = 0, jl = map.layerIds.length; j < jl; j++) { var currentLayer = map.getLayer(map.layerIds ); if(currentLayer.id == 'StoresResultsLayer'){ map.removeLayer(map.getLayer(map.layerIds )); }; }; I tried this but I don't get the whole splice thing. toc.layerInfos.splice(3, 0);// remove it. currentLayer = null; I create it using this code: var StoresResultsLayerURL = "My layer link here"; var StoresResultsLayerOptions = { "id": "StoresResultsLayer", "opacity": .99, "showAttribution": false }; var StoresResultsLayer = new esri.layers.ArcGISDynamicMapServiceLayer(StoresResultsLayerURL, StoresResultsLayerOptions); var layerDefinitions = []; //layerDefinitions[0] = varQuery; //layerDefinitions[1] = varQuery; //layerDefinitions[2] = varQuery; layerDefinitions[3] = varQuery; layerDefinitions[4] = varQuery; StoresResultsLayer.setLayerDefinitions(layerDefinitions); StoresResultsLayer.setVisibleLayers([3, 4]); var h = StoresResultsLayer.on("load", function () { toc.layerInfos.splice(3, 0, { layer: StoresResultsLayer, title: "Stores Results" }); toc.refresh(); toc.on('load', function (evt) { toc.findTOCNode(StoresResultsLayer, 0).hide(); toc.findTOCNode(StoresResultsLayer, 1).hide(); toc.findTOCNode(StoresResultsLayer, 2).hide(); }); h.remove(); }); //dlMCY_Stores.hide(); //--- End Add Layer to TOC ---// map.addLayer(StoresResultsLayer);
... View more
10-08-2014
07:47 AM
|
0
|
7
|
2399
|
Title | Kudos | Posted |
---|---|---|
1 | 04-18-2014 06:58 AM | |
6 | 08-11-2014 06:27 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|