POST
|
I want to populate the value in the field "description" when the value in "diameter" is created or changed. tableName - water_pipes fieldName - description valueMethod - expression valueInfo - IIF([DIAMETER] >=16, "250") onCreate - True onChange (attribute) - True onChange (geometry) - false manualOnly - False I've tried both creating a new feature and changing the value of an existing feature attribute but this expression is not working. Any ideas? I've looked through the forum and found much more complicated expressions that this seems simple in comparison.
... View more
03-14-2014
07:25 AM
|
0
|
5
|
3664
|
POST
|
Does the new alter field tool in 10.2.1 require that the enterprise geodatabase be upgraded to 10.2.1 in addition to the clients? Our organization just went through a major, months long upgrade from 9.3 to 10.2 on all clients and our SDE geodatabase. If I could get away with just updating my client to 10.2.1 and not the SDE geodatabase to get this functionality that would be great. - Mike
... View more
01-15-2014
06:45 PM
|
0
|
7
|
2650
|
POST
|
Here is the response I received from ESRI tech support: "Either method would be appropriate, however, tracking using editor tracking may be a better alternative than using the Attribute Add-In. The attribute add-in works at the client level which can be disabled when upgrading the software or if the client machine forgets to turn it on. In some scenarios, it may be better to turn on editor tracking since it works at the database level tracking edits. This means that when upgrading the software or when changing machines, you may not lose this functionality.
... View more
09-06-2013
12:03 PM
|
0
|
0
|
157
|
POST
|
I am exploring ways to automate the recording of the user name and date when a record is edited. It seems that editor tracking and the methods "current username" and "timestamp" in the Attribute Assistant Add-in offer two paths to doing the same thing. Is one favored over the other? Are these methods meant to be complementary?
... View more
09-03-2013
07:44 AM
|
0
|
1
|
665
|
POST
|
I misread the example I was following about how to use rstrip. Instead of using the number of characters I want removed I should use the actual characters! In my example I should have used '.sid' and it works.
... View more
08-20-2013
11:22 AM
|
0
|
0
|
971
|
POST
|
I want to strip off the last 4 characters of a layer name that is in my mxd. It is the only layer. It is a MrSid file. I want to export this image to pdf using the layer name without the .sid part. This code exports the map to PDF but it is not stripping off the .sid part. Ex: J-228-01-W-2013.sid.pdf I used 4 as the number of characters to strip off because I assumed that the dot needs to be removed also. import arcpy,os
mxd = arcpy.mapping.MapDocument(r"C:\GIS\designsheet.mxd")
df = arcpy.mapping.ListDataFrames(mxd)[0]
df.rotation = 0
lname = arcpy.mapping.ListLayers(mxd)[0].name
outFile = r"C:\GIS\output\\" + lname.rstrip('4') + ".pdf"
arcpy.mapping.ExportToPDF(mxd, outFile) - Mike
... View more
08-20-2013
11:18 AM
|
0
|
2
|
1778
|
POST
|
Finally figured it out. I needed to add esri.geometry.geographicToWebMercator(new esri.geometry.Point to this line var pt = new esri.geometry.Point(ptX,ptY,map.spatialReference); to make var pt = new esri.geometry.Point(esri.geometry.geographicToWebMercator(new esri.geometry.Point(ptX,ptY,map.spatialReference))); and it worked. I still don't quite understand why I had to do this but I will leave that to a discussion post.
... View more
05-01-2013
06:50 AM
|
0
|
0
|
513
|
POST
|
I figured out part of my problem. I did not capitalize my attribute so that it matches the field name - CentroidLongitude vs centroidLongitude. Now I can at least see the value in console.log. Still can't figure out how to add graphic markers to a graphicsLayer using this information.
... View more
04-30-2013
11:11 AM
|
0
|
0
|
513
|
POST
|
The documentation for a new graphic states "Creates a new Graphic object. All parameters are required and must be specified in the order given." http://help.arcgis.com/en/webapi/javascript/arcgis/jsapi/graphic.html#GraphicConst1 but under the concepts section on graphics there is this statement "Graphics are not required to have all of the above items, and no one item is required. " http://help.arcgis.com/en/webapi/javascript/arcgis/jshelp/inside_graphics.html Is this a discrepancy in the documentation or is there a real difference that I'm not seeing?
... View more
04-30-2013
09:33 AM
|
0
|
1
|
660
|
POST
|
Is it possible to add graphic points to the map or graphicsLayer using coordinates stored in the feature? I'm using a query to collect the features I'm interested in. The function addToMap will display those polygons on a the map graphics layer or another graphics Layer (I did that just to test it). I want to add a point marker on top using the coordinates in the feature. The coordinate fields type are double. I haven't been able to retrieve those coordinates even to show them through console.log much less create a graphic point. Various attempts show undefined. function addToMap(featureSet) { //initialize symbology defaultSymbol = new esri.symbol.SimpleMarkerSymbol().setColor(new dojo.Color([255,0,255])); var iconSymbol = new esri.symbol.PictureMarkerSymbol({ "angle":0, "xoffset":0, "yoffset":10, "type":"esriPMS", "url":"http://static.arcgis.com/images/Symbols/Shapes/BluePin1LargeB.png", "contentType":"image/png", "width":24, "height":24 }); var gLayer = new esri.layers.GraphicsLayer(); iTemplate = new esri.InfoTemplate("Sitename", "<tr><td>${Sitename}</tr></td>"); map.addLayer(gLayer); dojo.forEach(featureSet.features,function(feature){ map.graphics.add(feature.setSymbol(defaultSymbol).setInfoTemplate(iTemplate)); //gLayer.add(feature.setSymbol(defaultSymbol).setInfoTemplate(iTemplate)); //var ptX = feature.attributes.centroidLongitude; // returns undefined //var ptX = feature.centroidLongitude; // returns undefined //var ptY = feature.attributes.centroidLatitude; console.log(ptX); gLayer.add(new esri.geometry.Point(ptX,ptY,map.spatialReference).setSymbol(iconSymbol)); });
... View more
04-30-2013
07:58 AM
|
0
|
2
|
1073
|
POST
|
I solved it. Works in 3.4 too. I had to use a combination of hide,show and refresh. This post on GIS stack exchange helped get me on track. http://bit.ly/1035f0m. My code refreshes without needing a pan/zoom as this post suggests. I only posted the part of my code that really changed from my original question. The changeLayerVisibility function was deleted. function init() { map = new esri.Map("map", { basemap: "oceans", center: [-98.0, 38.0], zoom: 4, sliderOrientation: "horizontal" }); //set the parameters of the service here. Limit the service to show only a specific layer. var imageParameters = new esri.layers.ImageParameters(); imageParameters.layerIds = [5]; imageParameters.layerOption = esri.layers.ImageParameters.LAYER_OPTION_SHOW; //Takes a URL to a non cached map service. dmslayer = new esri.layers.ArcGISDynamicMapServiceLayer("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer",{"imageParameters":imageParameters}); map.addLayer(dmslayer); dmslayer.hide(); // hide the layer initially } function addMap(dropdown){ //console.log(dropdown); //create the layer definition here var layerDefs = []; layerDefs[5] = "STATE_NAME = '" + dropdown + "'"; dmslayer.setLayerDefinitions(layerDefs); dmslayer.refresh(); dmslayer.show(); }
... View more
03-25-2013
12:55 PM
|
0
|
0
|
408
|
POST
|
I need help in interpreting what I am seeing and wondering why I'm seeing duplicate features. I'm using this example: http://help.arcgis.com/en/webapi/javascript/arcgis/jssamples/fl_layer_definition.html "Feature layer with layer definition applied" on my own server and viewing the results after opening the page in Firefox. I modified the tooltip code so I can see the OBJECTID. Your results may be different from what I describe here. I used the tooltip to find the OBJECTID on screen and then expanded the URLs to find the same OBJECTID. I'm specifically looking at the shaded area next to the I-35 sign on the map. When I expand the keys under the URLs in the JSON tab on the NET tab I can see where the featurelayer (fields) is being created (the line starts as GET1?). Then there are 3 more lines that when expanded have a key called "features". The first one has 1 feature (0), the second line has 4 features (0,1,2,3) and the third line has 2 features (0,1). In the second line with 4 features, the 4th feature has an OBJECTID of 5095 and in the third line the 2nd feature has an OBJECTID of 5095. Does that mean that this feature is being downloaded twice? I'm not moving the map around at all. There are also URLs that when expanded do not show any features. They appear to show the same keys as the ones I described above but the features key cannot be expanded. These have a size of 2.6kb. I'm not sure what is happening here. In this example the sizes that are being downloaded are not a big deal. In my own data I have some large features and when I run this example against my own internal data and limit the definition expression to one feature I get six URLs returned. I'm assuming the first two are about the creation of the actual feature layer. The next four seem to be pairs of duplicates. The URLs with a size of 865B have a key called features that appears to be empty. The URLs with a size of 4.2KB have a key called features that is listing the feature I defined. So, I asked myself if in fact it was downloading the feature twice. Am I interpreting these results correctly? [ATTACH=CONFIG]22845[/ATTACH]
... View more
03-21-2013
10:38 AM
|
0
|
1
|
592
|
POST
|
I've modified this sample to see if there is a way to change the display of an ArcGISDynamicMapService layer that uses layer definitions. I'm changing the definition through a drop down menu. The previous state boundary does not clear before drawing a new state. I've looked through the forums and the API and tried different ideas. Nothing seems to work. Of course, it could just be that my advanced novice skills are not just advanced enough and I am missing something obvious. 🙂 I know that I could use feature layers but in my own project some of my features are just too big and will actually crash the browser. Using a dynamic service is much faster. I tried to create a jsfiddle instead of posting the code but I could not figure out how to make the drop down menu work. So, I've posted both. http://jsfiddle.net/mapguymike/aThtT/ <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta http-equiv="X-UA-Compatible" content="IE=7,IE=9"> <!--The viewport meta tag is used to improve the presentation and behavior of the samples on iOS devices--> <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"> <title>Create Map with Custom ArcGISDynamicMapServiceLayer Layer Definitions</title> <link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.3/js/dojo/dijit/themes/claro/claro.css"> <link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.3/js/esri/css/esri.css"> <script src="http://serverapi.arcgisonline.com/jsapi/arcgis/3.3/"></script> <script> dojo.require("esri.map"); var map, layer, state = 'Iowa'; function init() { map = new esri.Map("map", { basemap: "streets", center: [-98.258, 38.236], zoom: 4 }); } function changeLayerVisibility(){ console.log('inside clv'); var layerIdsArr = map.layerIds; layer = map.getLayer(layerIdsArr["census"]); layer.hide(); } function addMap(state){ var imageParameters = new esri.layers.ImageParameters(); var layerDefs = []; layerDefs[5] = "STATE_NAME='" + state + "'"; imageParameters.layerDefinitions = layerDefs; imageParameters.layerIds = [5]; imageParameters.layerOption = esri.layers.ImageParameters.LAYER_OPTION_SHOW; imageParameters.transparent = true; var dynamicMapServiceLayer = new esri.layers.ArcGISDynamicMapServiceLayer("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer", {"imageParameters":imageParameters, id:"census"}); map.addLayer(dynamicMapServiceLayer); layer.show(); } dojo.ready(init); </script> </head> <body class="claro"> <div id="map" style="width:900px; height:600px;"></div> <div style="position:absolute;top:10px;right:250px;z-index:999;"> <form><select id="ddbox" onClick="changeLayerVisibility()" onChange="addMap(this.value)" data-dojo-type="dijit.form.Select"> <option value = "" selected="selected">Select...</option> <option value="Oregon" id = "1">Oregon</option> <option value="Colorado" id = "2">Colorado</option> <option value="Iowa" id = "3">Iowa</option> <option value="Alabama" id = "4">Alabama</option> <option value="Maine" id = "5">Maine</option> </select></form> </div> </body> </html>
... View more
03-20-2013
08:55 AM
|
0
|
1
|
3187
|
POST
|
I'm still not clear as to whether both parameters should be included or not. The API says that by specifying layerids then only those layers will be identified. It doesn't say anything about whether the layers are visible or not. Whereas the layer_option parameter is about visibility. I discovered that it does help to use both the layerids and layer_option_all. In my particular application I was identifying two featurelayers from one mapservice. An identify operation was only returning the results from one layer even though I specified both layers in identifyParams.layerIds = [3,4] and I knew that it should be picking up a feature from the second layer; When I added identifyParams.layerOption = esri.tasks.IdentifyParameters.LAYER_OPTION_ALL; the results from both layers came back. So, the sample from the original posting may be correct, and all that might be needed is a clearer explanation of how these two parameters work together.
... View more
06-08-2012
12:52 PM
|
0
|
0
|
315
|
POST
|
After reading all about graphics and graphicLayer I'm still somewhat confused. If I add a layer to a map it displays the map feature (or graphic? Is that the right terminology?). Is the default symbol what is listed in the service properties? If I want to change the color do I create a symbol and add it to a graphicsLayer and then add it to the map? Does this mean that I am essentially drawing on top of the default symbol that draws first? Is it really displaying twice? How would I change the color and add it to the map? var imageParameters = new esri.layers.ImageParameters();
imageParameters.layerIds = [0];
imageParameters.layerOption = esri.layers.ImageParameters.LAYER_OPTION_SHOW;
imageParameters.transparent = true;
var dLayer = new esri.layers.ArcGISDynamicMapServiceLayer("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer",{"imageParameters":imageParameters});
map.addLayer(dLayer);
... View more
06-07-2012
11:43 AM
|
0
|
2
|
665
|
Title | Kudos | Posted |
---|---|---|
7 | 3 weeks ago | |
1 | 02-01-2019 08:27 AM | |
2 | 04-23-2024 08:44 AM | |
1 | 11-07-2023 11:31 AM | |
1 | 11-21-2023 10:17 AM |
Online Status |
Offline
|
Date Last Visited |
2 weeks ago
|