POST
|
I can't seem to locate how to change the default label of the ClassBreaksRenderer. I can change the symbol, but not the label for the legend for data that does not fall within the scope of the breaks.
... View more
03-23-2016
08:07 AM
|
0
|
3
|
1802
|
POST
|
I'm confused. I can write something using ArcObjects and have it wrapped as a gp tool now or is that something that would need to be changed by Esri before I could do it? Cause I think that would work for me if that is possible presently (and I saw an example of how to do that.)
... View more
12-07-2015
09:02 AM
|
0
|
1
|
829
|
POST
|
While that would work, the way that was project has to be done, I can't use ArcObjects. Its has to be done in an geoprocessing service that I can call within the existing perl code since this is replacing an old way of creating a map. We can't recode the entire website for this one little part. Thank you though.
... View more
12-07-2015
06:43 AM
|
0
|
3
|
829
|
POST
|
I was hoping there was a way to do this without first creating a dummy layer file of every possible color I would use. I'm looking for how to change the symbology in code, not just assign it an already existing one. In arcims I could do this simply with arcxml: <LAYER type="acetate" name="NAME" visible="true" id="$preLineID"> <OBJECT units="database"> <SIMPLELINESYMBOL transparency="1.0" type="$markType" overlap="false" color="255,0,0" antialiasing="true" width="4" /> <POLYLINE> <PATH> <POINT x="$xPoint1" y="$yPoint1" /> <POINT x="$xPoint2" y="$yPoint2" /> </PATH> </POLYLINE> </OBJECT> </LAYER>
... View more
12-01-2015
08:45 AM
|
0
|
5
|
829
|
POST
|
Hi, In python, I've created a new polyline feature class, turned it into a layer and added it to an existing map. How can I dynamically change the color of that line in python code?
... View more
12-01-2015
07:47 AM
|
0
|
7
|
4090
|
POST
|
For the line symbol, it is a basic line, I just need to assign them different colors in code
... View more
11-30-2015
09:45 AM
|
0
|
0
|
624
|
POST
|
Can't believe I hadn't thought of that... thank you!! One last question though, how do I remove the default symbol it will give me? Just make a dummy layer in the map with no symbology and assign my new point layer to that? I still need to know how to change the symbology of the line layer that is created with this script 2.
... View more
11-30-2015
09:44 AM
|
0
|
2
|
624
|
POST
|
Thanks! That will help with the table create and running the tools I need. Any idea about changing the symbology after I add the points to the map to be a letter rather than the default circle?
... View more
11-30-2015
09:37 AM
|
0
|
4
|
624
|
POST
|
Not sure how to delete this thread. Didnt know about the moving part, did that. Thanks
... View more
11-30-2015
09:35 AM
|
0
|
0
|
263
|
POST
|
I posted this in the general mapping section, but prob should have posted it here in the developer. Can I get any ideas please? ArcXML/ArcIMS equivalents in python/arcpy - creating points and lines
... View more
11-30-2015
08:36 AM
|
0
|
2
|
2260
|
POST
|
I need to update an old script that uses ArcIMS and ArcXML into modern day python and arcpy. This script runs in perl, but the part I need to recreate has to do with creating graphics layers on the fly. Given some lat/longs, how do I create them as points, then draw lines between them, and then symbolize them how I want? In perl, I create the xml I want, then send it to the server pretty easily as seen below: In this code I create the points and lines based on an array of lat/longs Then I send the request to the arcims server which is hosting a basemap that these are drawn on and export a jpeg: This seems much harder than it should be in python. The script I've come up with so far is below. It creates a points layer and adds it to an existing map (which works fine), but I cant change the symbols. Basically I just want to use a text letter for each point. The other tricky part will be creating the lines from it. I will use the script and tool in arctoolbox, but this is really a ton more work and I still don't know how to change the symbols. The only idea I came up with is to add a dummy layer that is symbolized how I want but turned off, then apply that symbology to the newly created letters. But that won't give me the dynamic creation I need. (These scripts do a bunch more, I just tried to simplify it here.) At the end it exports a jpeg of the map. import arcpy import os import uuid arcpy.env.overwriteOutput = True templateMxd = r"C:\location\to\my\mxd.mxd" mxd = arcpy.mapping.MapDocument(templateMxd) # list of lat/longs ptList = [[-82.1, 29.51], [-80.07, 31.13], [-82.97, 31.96], [-86.12, 27.71], [-82.9, 25.25]] pt = arcpy.Point() ptGeoms = [] for p in ptList: pt.X = p[0] pt.Y = p[1] ptGeoms.append(arcpy.PointGeometry(pt)) tempPoints = os.path.join(arcpy.env.scratchGDB, 'tempPoints') arcpy.env.workspace = arcpy.env.scratchFolder arcpy.CopyFeatures_management(ptGeoms, tempPoints) arcpy.MakeFeatureLayer_management(tempPoints, "Start_Points") arcpy.SaveToLayerFile_management("Start_Points", "Start_Points.lyr") tempPointsLayer = os.path.join(arcpy.env.scratchFolder, 'Start_Points.lyr') addLayer = arcpy.mapping.Layer(tempPointsLayer) df = arcpy.mapping.ListDataFrames(mxd, 'Layers')[0] arcpy.mapping.AddLayer(df, addLayer, "TOP") lyrExtent = addLayer.getSelectedExtent() df.extent = lyrExtent output = 'WebMap_{}.jpg'.format(str(uuid.uuid1())) Output_File = os.path.join(arcpy.env.scratchFolder, output) # Export the WebMap arcpy.mapping.ExportToJPEG(mxd, Output_File, df, df_export_width=500, df_export_height=500, resolution=150) # Set the output parameter to be the output file of the server job arcpy.SetParameterAsText(1, Output_File) del mxd, addLayer, lyr
... View more
11-25-2015
09:22 AM
|
0
|
6
|
2788
|
POST
|
I'm glad other people are running into this problem. I haven't been able to come up with a solution, but will need to soon. I'm hoping someone from esri's development team chimes in.
... View more
09-29-2015
06:16 AM
|
0
|
0
|
708
|
POST
|
I saw that and was thinking the same thing. However I wasn't about exactly how to do that. An example would be awesome though!
... View more
08-19-2015
01:08 PM
|
0
|
1
|
708
|
POST
|
Hi, I'm using the new smartMapping createClassedColorRender, but don't like the color ramp options that come for the default basemaps. How can I change the color ramp to a simple dark blue to red ramp? This is how I'm creating the renderer now (its for a feature layer) Thanks, -dave smartMapping.createClassedColorRenderer({ layer: featureLayer, field: fieldName, basemap: "oceans", classificationMethod: "natural-breaks", numClasses: 10 }).then(function (response) { featureLayer.setRenderer(response.renderer); featureLayer.redraw(); createLegend(map, featureLayer, fieldName); }); map.addLayer(featureLayer);
... View more
08-19-2015
11:02 AM
|
0
|
6
|
4198
|
Title | Kudos | Posted |
---|---|---|
1 | 06-07-2017 08:56 AM | |
2 | 06-09-2017 09:58 AM | |
32 | 07-26-2010 06:50 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|