POST
|
Hi Andy, I tried this way but it didn't work. It doesn't group the values. But one thing I noticed that if I import the symbology layer from the symbology tab it works (it groups the values). So, I am not sure why it doesn't group the values from Arcpy.
... View more
10-03-2016
09:03 AM
|
0
|
0
|
905
|
POST
|
I am trying to group values through arcpy. So, I would like to group all approved together and all reject together. But I am not sure how to do it through Python script. Below is the part of the script: arcpy.MakeFeatureLayer_management(FC3, r"C:\Users\Documents\NGN\Regions\MW_Decision.lyr") layer3 = arcpy.mapping.Layer(r"C:\Users\Documents\NGN\Regions\MW_Decision.lyr") Sym_layer3 = r"C:\Users\Documents\NGN\Symbology layer new\MW_Decision.lyr" arcpy.ApplySymbologyFromLayer_management (layer3, Sym_layer3) arcpy.mapping.AddLayer(df, layer3, "AUTO_ARRANGE") lyr3 = arcpy.mapping.ListLayers(mxd, "", df)[0] lyr3.visible = False lyr3.name = "MW_Decision" Any help is appreciated.
... View more
09-30-2016
12:44 PM
|
0
|
6
|
1946
|
POST
|
No it doesn't throw an error. It does show labels with the format I mentioned in that line. Now I want add the scale to the label and set the placement property to it. Which I have no idea how to do it.
... View more
09-27-2016
03:05 PM
|
0
|
0
|
767
|
POST
|
Below is the code and what I am trying to do is set the scale range on Label minScale = 500000; and label placement should be top center only. I am sure how to automate this through arcpy. arcpy.MakeFeatureLayer_management(FC7, r"C:\Users\Documents\Search_Ring.lyr") layer7 = arcpy.mapping.Layer(r"C:\Users\DocumentsSearch_Ring.lyr") Sym_layer7 = r"C:\Users\Documents\Symbology layer new\Search Ring.lyr" arcpy.ApplySymbologyFromLayer_management (layer7, Sym_layer7) arcpy.mapping.AddLayer(df, layer7, "AUTO_ARRANGE") lyr7 = arcpy.mapping.ListLayers(mxd, "", df)[0] lyr7.labelClasses[0].expression = '"{}" + [Candidate_Code] + "{}"'.format("<CLR blue='255'><FNT size = '9'><BOL>", "</BOL></FNT></CLR>") lyr7.showLabels = True lyr7.visible = False lyr7.name = "Search_Ring" lyr7.maxScale = 0; lyr7.minScale = 25000000; lyr7.transparency = 25;
... View more
09-27-2016
02:01 PM
|
1
|
4
|
2431
|
POST
|
I figured out the way instead of AUTO_ARRANGE use TOP for all layers and it worked.
... View more
09-27-2016
08:41 AM
|
0
|
0
|
560
|
POST
|
I have seven layers to add in mxd but the sequence of the layers are incorrect as well as the layer names are also incorrect. Attached is my script and the screenshot of the incorrect and correct TOC. Any help is appreciated.
... View more
09-26-2016
10:46 AM
|
0
|
2
|
1177
|
POST
|
Hi Luke, That will be great if I can get the python script which will update the table with all the rows from the second table. Thanks MG Sent from my iPhone
... View more
01-26-2016
11:21 AM
|
0
|
1
|
1144
|
POST
|
I am working with two attribute tables shown below. I want to join Centroid_Sites_Fbr (objectID) to Centroid_Sites_Fiber (In_FID). As you can see Centroid_Sites_Fiber contains multiple values for some records. I want to join these two tables where output should have all 15 ObjectId plus the multiple data from Centroid_Sites_Fiber table. Any help is appreciated. Thanks MG
... View more
01-26-2016
09:30 AM
|
0
|
5
|
2975
|
POST
|
Hey Terry, As Robert said this is the working sample code. Thanks Manjari
... View more
08-07-2015
08:55 AM
|
0
|
0
|
390
|
POST
|
Hi Tom, Thanks for the quick response. I did look at the sample and was able to create which you have already created, but what I am trying to do is that user will enter X and Y coordinates in the box and click convert then it will plot the point and also shows the address on the map. Please let me know how we can do that. Really appreciate your help. Thanks Manjari
... View more
07-16-2015
07:11 AM
|
0
|
11
|
1605
|
POST
|
Hi, I am trying to write a JavaScript in which I would Like to convert the Coordinates and plot those coordinates on my map. Basically, trying to do reverse geocoding. Below is the Script I wrote so far in which I can geocode the address but I am not able to convert X and Y to an address and can't plot the point. Please let me know how to fix this. <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <!--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>ArcGIS dynamic and tile layers using Popup and InfoTemplates</title> <link rel="stylesheet" href="http://js.arcgis.com/3.11/dijit/themes/claro/claro.css"> <link rel="stylesheet" href="http://js.arcgis.com/3.11/esri/css/esri.css"> <style> html, body, #mapDiv { padding: 0; margin: 0; height: 100%; } #leftPanel { width:20%; border-top: solid 1px #343642; border-left: solid 1px #343642; border-bottom: solid 1px #343642; border-right: solid 1px #343642; margin:0px 0px 5px 5px; color: #343642; font:100% Georgia, "Times New Roman", Times, serif; } #convertButton { font-size:12pt; } </style> <script src="http://js.arcgis.com/3.11/"></script> <script src="http://maps.google.com/maps?file=api&v=2&key=AIzaSyA7d88yhU8O8p7tujVHvSGNlB8KTk_V8dE" type="text/javascript"></script> <script> var map, candidateLocation; require(["esri/map", "esri/SnappingManager", "esri/dijit/Measurement", "esri/dijit/BasemapGallery", "esri/layers/FeatureLayer", "esri/layers/ArcGISDynamicMapServiceLayer", "esri/dijit/Legend", "esri/tasks/locator", "esri/dijit/Geocoder", "esri/tasks/query", "esri/geometry/Circle", "esri/graphic", "esri/InfoTemplate", "esri/symbols/SimpleMarkerSymbol", "esri/symbols/SimpleLineSymbol", "esri/symbols/SimpleFillSymbol", "esri/renderers/SimpleRenderer", "esri/symbols/Font", "esri/symbols/TextSymbol", "esri/config", "esri/Color", "esri/tasks/geometry", "esri/geometry/Extent", "dojo/_base/array", "dijit/registry", "dojo/dom", "dojo/parser", "dijit/layout/BorderContainer", "dijit/layout/ContentPane", "dijit/layout/AccordionContainer", "dijit/form/Button", "dijit/form/Textarea", "dijit/form/TextBox", "dijit/form/Select", "dojo/on", "dojo/domReady!", ], function( Map, SnappingManager, Measurement, BasemapGallery, FeatureLayer, ArcGISDynamicMapServiceLayer, Legend, Locator, Geocoder, Query, Circle, Graphic, InfoTemplate, SimpleMarkerSymbol, SimpleLineSymbol, SimpleFillSymbol, SimpleRenderer, Font, TextSymbol, esriConfig, Color, geometry, Extent, arrayUtils, registry, dom, parser, on) { parser.parse(); map = new Map("mapDiv", { basemap: "gray", center: [-95.249, 38.954], zoom: 3, sliderStyle: "large" }); var geocoder = new Geocoder({ arcgisGeocoder: { placeholder: "Enter an Address", sourceCountry: "USA" }, autoComplete: true, map: map }, dom.byId("search")); geocoder.on("select", showLocation); //script for locating the address with Longitude and Latitude. function init() { var inLat = new dijit.form.TextBox({ name: "inLat", //value: 34.0571709 }, "inLat"); var inLon = new dijit.form.TextBox({ name: "inLon", //value: -117.1942978 }, "inLon"); //dojo.byId("inLat").value = defaultcoord.y; //dojo.byId("inLon").value = defaultcoord.x; var button = new dijit.form.Button({ label: "Convert", },"convertButton"); } dojo.ready(init); function showLocation(evt) { map.graphics.clear(); console.log(evt); var point = evt.result.feature.geometry; var symbol = new SimpleMarkerSymbol().setStyle( SimpleMarkerSymbol.STYLE_SQUARE).setColor( new Color([255,0,0,0.5]) ); var graphic = new Graphic(point, symbol); map.graphics.add(graphic); map.centerAndZoom(graphic, 4); map.infoWindow.setTitle("Search Result"); map.infoWindow.setContent(evt.result.name); map.infoWindow.show(evt.result.feature.geometry); } }); </script> </head> <body class="claro"> <div id="mainWindow" data-dojo-type="dijit/layout/BorderContainer" data-dojo-props="design:'sidebar', gutters:false" style="width:100%; height:100%;"> <div id="leftPanel" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'left'"> <br> Enter an address then click the magnifying glass to return the location for street addresses in the United States. <div id="search"></div> <br> <br> <div style="font-size: 12pt; font-weight:bold;"> Input Longtitude and Latitude </div> <br> <div> <span>X: </span><input tabindex="1" type="text" id="inLon" /> </div> <div> <span>Y: </span><input tabindex="2" type="text" id="inLat" /> </div> <br> <div> <button id="convertButton" data-dojo-type="dijit/form/Button">Convert</button> </div> </div> <div id="mapDiv" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'center'"> <div style="position:absolute; right:20px; top:10px; z-Index:999;"></div> </div> </html>
... View more
07-15-2015
02:08 PM
|
0
|
15
|
5588
|
POST
|
Steve, I looked in to it and I have SQL Server 2008. so will there be any way around to it.
... View more
05-13-2015
12:23 PM
|
0
|
1
|
637
|
POST
|
I wrote the javaScript to get the attribute table using Arcgis sample script but when I run it it gives an error "Pagination is not supported. I can see the points on the map but it's not pulling the attribute table. I am using arcgis 10.3. I am attaching the script and the output. Please let me know how to fix this issue.
... View more
05-13-2015
07:46 AM
|
0
|
3
|
4219
|
Title | Kudos | Posted |
---|---|---|
1 | 10-29-2014 07:08 AM | |
1 | 09-27-2016 02:01 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|