POST
|
Tammy, This is available just add some extra parameters. Here is how it works Printparams.extraParameters = { Georef_info: "True" };
... View more
08-14-2014
09:45 AM
|
0
|
0
|
1170
|
POST
|
I have this implemented in AMD. I use a config file with the basemaps that I want included, and I call createBasemapGallery() at the end of my map load event. function createBasemapGallery() { /// <summary>manually create basemaps to add to basemap gallery</summary> try { var basemaps = []; require(["esri/dijit/BasemapGallery", "esri/dijit/BasemapLayer", "esri/dijit/Basemap"], function ( BasemapGallery, BasemapLayer, Basemap ) { for (b in mybasemaps) { //load from config array of basemaps if (mybasemaps.addtomap == true) { var bm = null bm = new esri.dijit.BasemapLayer({ url: mybasemaps.url }); var layerBasemap = new esri.dijit.Basemap({ layers: [bm], id: mybasemaps.svcid, title: mybasemaps.title, thumbnailUrl: mybasemaps.thumbnailUrl }); basemaps.push(layerBasemap) }; }; //add the basemap gallery, in this case we'll display maps from ArcGIS.com var basemapGallery = new BasemapGallery({ basemaps: basemaps, showArcGISBasemaps: false /*config.external*/, map: map }, "basemapGallery"); basemapGallery.startup(); // if (config.external) { // basemapGallery.select('ESRITerrain'); // } basemapGallery.on("error", handleProcessError); }); } catch (err) { errorHandler(err, "createBasemapGallery") }; }; //config array of mybasemaps var mybasemaps = { "ESRITerrain": { "url": "http://server.arcgisonline.com/ArcGIS/rest/services/World_Terrain_Base/MapServer", "svcid": "ESRITerrain", "title": "Terrain (Default)", "thumbnailUrl": "img/thumbs/Terrain_ne_usa.png", "addtomap": config.external }, "Pic2013": { "url": ArcServer + "Pictometry2013/MapServer", "svcid": "Pic2013", "title": "Prescott/Prescott Valley 2013", "thumbnailUrl": "img/thumbs/imagery.jpg", "addtomap": true }, "ESRIImagery": { "url": "http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer", "svcid": "ESRIImagery", "title": "ESRI Imagery", "thumbnailUrl": "img/thumbs/imagery.jpg", "addtomap": config.external }, // },"NAIP2013": { "url":"http://gis.apfo.usda.gov/arcgis/rest/services/NAIP/Arizona_2013_1m_NC/ImageServer", // "svcid": "NAIP2013", "title": "NAIP 2013", "thumbnailUrl": "img/thumbs/imagery.jpg", "addtomap": true // }, "NAIP2011": { "url": ArcServer + "NAIP2010/MapServer", "svcid": "NAIP2010", "title": "NAIP 2010", "thumbnailUrl": "img/thumbs/imagery.jpg", "addtomap": true }, "AE2009": { "url": ArcServer + "AE2009a/MapServer", "svcid": "AE2009", "title": "Aerial Express 2009", "thumbnailUrl": "img/thumbs/imagery.jpg", "addtomap": true }, "DG2007": { "url": ArcServer + "DG2007/MapServer", "svcid": "DG2007", "title": "Digital Globe 2007", "thumbnailUrl": "img/thumbs/imagery.jpg", "addtomap": true }, "NAIP2007": { "url": ArcServer + "NAIP2007/MapServer", "svcid": "NAIP2007", "title": "NAIP 2007", "thumbnailUrl": "img/thumbs/imagery.jpg", "addtomap": true }, "Blank": { "url": "http://gis.yavapai.us/arcgis/rest/services/NoBasemap/MapServer", "svcid": "Blank", "title": "No Basemap", "thumbnailUrl": "img/thumbs/Terrain_ne_usa.png", "addtomap": true }, "ESRIStreets": { "url": "http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer", "svcid": "ESRIStreets", "title": "Streets", "thumbnailUrl": "img/thumbs/streets.jpg", "addtomap": config.external }, "ESRINatGeo": { "url": "http://services.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer", "svcid": "ESRINatGeo", "title": "National Geographic", "thumbnailUrl": "img/thumbs/natgeo.jpg", "addtomap": config.external }, "ESRI_Topo": { "url": "http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer", "svcid": "ESRI_Topo", "title": "Topographic", "thumbnailUrl": "img/thumbs/topographic.jpg", "addtomap": config.external }, "Delorme_Topo": { "url": "http://server.arcgisonline.com/ArcGIS/rest/services/Specialty/DeLorme_World_Base_Map/MapServer", "svcid": "Delorme_Topo", "title": "Delorme Topo", "thumbnailUrl": "img/thumbs/topographic.jpg", "addtomap": config.external }, "USATopo": { "url": "http://services.arcgisonline.com/ArcGIS/rest/services/USA_Topo_Maps/MapServer", "svcid": "USATopo", "title": "USGS Topo", "thumbnailUrl": "img/thumbs/usa_topo.jpg", "addtomap": config.external } }; Hope that helps
... View more
08-14-2014
09:34 AM
|
1
|
0
|
778
|
POST
|
What I did was to build a separate function that uses the query task that loops through the graphics and the last map click to find the selected features, then build an array of the queries, pass that array to a promise, loop though the results and return it to the user.
... View more
08-14-2014
09:21 AM
|
1
|
0
|
372
|
POST
|
We run a separate service for labels. That way you can turn them on/off at will.
... View more
08-07-2013
07:33 AM
|
0
|
0
|
962
|
POST
|
Thanks for posting this code. It helped me develop my own. This allows you to adjust the resolution, and the width of the exported image. It also allows you to print specific pages. Just figured I would post it for someone else's use. Have a great day! import arcpy, os, exceptions, collections
print "Starting process " + str(time.ctime())
mxd = arcpy.mapping.MapDocument("CURRENT")
df = arcpy.mapping.ListDataFrames(mxd)[0]
mapLayers = arcpy.mapping.ListLayers(mxd)
out_loc = "\\\\ntdmzgis\\Data\\NameOfFolderHere\\" #TODO: Set the output locations, add as a parameter
res = 300 #TODO: this is the output resolution 300
dfWidth = 8 #TODO: this is the width of the dataframe in inches
inch_to_meters = 0.0254 #This is the convertion for inches to meters must match the defined coordinate system of the data frame
print_pages = [] #TODO: Add pages; example range ['6-8',21,'9-18',36], leave blank to get all pages
if mapLayers.count <> 0:
for lyr in arcpy.mapping.ListLayers(mxd, "L*", df): #This selects the layer names,make sure they are named L1, L2, etc. Can manually select layer if needed
print "Checking if " + lyr.name + " is feature Layer"
if lyr.isFeatureLayer == True:
print "We found a feature layer"
if os.path.exists(out_loc + lyr.name):
#print "Folder existed" #Uncomment this line and Comment out next line if you want to overwrite the folder
raise Exception ("This " + out_loc + lyr.name + " folder existed! \n Are you sure this is the right location? \n Yes, Please move, rename, or delete to continue...")
else:
os.makedirs(out_loc + lyr.name)
print "A new directory was made at " + out_loc + lyr.name
rows = arcpy.SearchCursor(lyr)
print "Starting process to make clipped JPEGs for " + lyr.name + " " + str(time.ctime())
d = len(print_pages)
if d <= 0:
rows1 = arcpy.SearchCursor(lyr)
for rw in rows1:
print_pages.append(rw.getValue("PageNumber"))
if [el for el in print_pages if isinstance(el, collections.Iterable) and ('-' in el)]:
print "We have a range"
for p in range(d):
print str(p) + " of " + str(d)
if print_pages
.find("-"):
l = print_pages
m = l.partition("-")[0]
n = l.partition("-")[2]
del print_pages
for o in range(int(m),int(n)+1):
print_pages.append(o)
del l, m, n, o
else:
print "No range selected"
print print_pages
for row in rows:
pg = row.getValue("PageNumber")
if pg in print_pages:
df.extent = row.Shape.extent
print "Feature Extent: " + str(row.Shape.extent)
print "Selected scale: " + str(df.scale)
xmin, ymin, xmax, ymax = row.shape.extent.XMin, row.shape.extent.YMin, row.shape.extent.XMax, row.shape.extent.YMax
xWidth = xmax - xmin
yHeight = ymax - ymin
featSq = math.sqrt(math.pow(xWidth,2) + math.pow(yHeight,2))
dfSq = math.sqrt(math.pow(df.elementWidth * inch_to_meters,2) + math.pow(df.elementHeight * inch_to_meters,2))
#Calculates the needed scale to fit image into dataframe size
if mxd.activeView != 'PAGE_LAYOUT' :
df.scale = (featSq / dfSq) * 0.651951975
else:
df.scale = (featSq / dfSq)
print "Using scale for " + mxd.activeView
print "Adj. scale: " + str(df.scale)
#Set the size of the dataframe to match the feature
df.elementWidth = dfWidth
df.elementHeight = dfWidth * (yHeight/xWidth)
df.elementPositionX, df.elementPositionY = 0, 0
print "DF Width: " +str(df.elementWidth) + " x Height: " + str(df.elementHeight)
#Set the pixel size based on the resolution
df = arcpy.mapping.ListDataFrames(mxd)[0]
picWidth = long(df.elementWidth * res)
picHeight = long(df.elementHeight * res)
print "Image Width: " +str(picWidth) + " x Height: " + str(picHeight)
print "Working on row..." + str(row.getValue("PageNumber")) + " at " + str(time.ctime())
arcpy.RefreshActiveView()
arcpy.mapping.ExportToJPEG(mxd, out_loc + lyr.name + "\\" + str(row.getValue("PageNumber")) + ".jpg", df, df_export_width= picWidth, df_export_height=picHeight, resolution=res, world_file=True)
print "Finished row..." + str(row.getValue("PageNumber")) + " at " + str(time.ctime())
print lyr.name + " JPEGs have been made at " + str(time.ctime())
else:
print lyr.name + " was not a Feature Class"
try:
lyr
except:
del mxd, df, mapLayers, out_loc, res, dfWidth, inch_to_meters
raise Exception ("Check the layer Name in line 12 is actually in the map.")
else:
raise Exception ("No layers were in map.")
print "Creating web cache completed " + str(time.ctime())
#clean up our varibles
del mxd, df, mapLayers, out_loc, res, dfWidth, inch_to_meters, lyr, rows, row, print_pages, xmin, ymin, xmax, ymax, xWidth, yHeight, featSq, dfSq, picWidth, picHeight, p,rows1, rw
... View more
02-11-2013
12:14 PM
|
2
|
0
|
434
|
POST
|
I have simplified my app and implemented the suggestions previously given. I have also projected my point feature class into WebM, Changed my feature class to a regular point shape file with no Z values. In my rest server I can query via (Post) I can delete features I can not: add a feature via Json update feature apply edits I recieve error code 400 Invaliad graphic features, invalid parameters Do you have any other suggestions for me to try? Again thank you for your time.
... View more
09-07-2012
09:53 AM
|
0
|
0
|
359
|
POST
|
i'm not sure i understand what you're doing onAttributeChange I am attempting to save the attribute on every change because the save was not working. why write the feature to JSON? To be honest with you this came from the update manger, not to sure. why load both the editor widget and the attribute inspector? are you confident that your implementation of the undomanager isn't causing the problem? I tried the editor widget first, it didn't function the way I was wanting it to.(It still did not update the feature). The editor widget is commented out now, but I left the code there just in case I wanted to use it later. I can take the undomanager out it is not nessacary right now. a good way to check would be to try updating the feature without the callback I can try this to. Just a note the service was down for a little bit. My feature class is a Point Z shape style so I added a default value for the Z to the service. It is up now. Thanks for all the great info.
... View more
09-06-2012
02:33 PM
|
0
|
0
|
359
|
POST
|
Thanks for looking into this problem. I have been working on it for a week now. I am completly stumped!
... View more
09-06-2012
12:29 PM
|
0
|
0
|
736
|
POST
|
I just calced the null values to draft, and forgot to check the feature service when I restarted the service. It is up now.
... View more
09-06-2012
10:58 AM
|
0
|
0
|
736
|
POST
|
jgravois, Yes, I have map symbology on my draft field. I use a group for null and draft. This makes the symbol the same. Should I get rid of the null values and try it again? Thanks for your response.
... View more
09-06-2012
10:46 AM
|
0
|
0
|
736
|
POST
|
Here is an updated link to my semifunctional page http://gis.co.yavapai.az.us/SurveyMon/editor.htm
... View more
09-05-2012
11:45 AM
|
0
|
0
|
736
|
POST
|
I am using the attribute inspector to try and edit a point feature class. I am getting some errors currently. Onload: [ATTACH=CONFIG]17503[/ATTACH] and after I change some of the attributes: [ATTACH=CONFIG]17504[/ATTACH] This error repeats (7) time per attribute changed or if I hit the save button My proxy.config files appears to be functioning properly after I manualy set the location of the proxy file. The funny part about the whole thing is the "delete" feature button deletes the feature with no problem. Do you have any suggestions on how to fix this? I will happy attach my code if you want to look at it. Thanks for your time.
... View more
09-05-2012
11:32 AM
|
0
|
13
|
1581
|
POST
|
Sorry I don't know about that. I just checked my computer and my phone at the same site and I am experiencing the opposite of what you are. My GPS is approx 25- 50 feet away from my location. While my computer is 2-3 miles away. Our production database is in State Plane, then we reproject to WebM for our online database. Our services are pointing to the Web database. I don't think this has anything to do with it though. Sorry I cant help you more.
... View more
06-08-2012
02:12 PM
|
0
|
0
|
570
|
POST
|
Well we have customized the code to use our SQL database. This is in WebMercator.
... View more
06-08-2012
01:56 PM
|
0
|
0
|
570
|
POST
|
Are you using a GPS? The GPS on the phone\ tablets usually work really well. Within some acceptable tolerances. ..or are you trying to locate the computer? From what I can figure is the computer location is based on where the IP address is registered. This usually gets you within a town\ city but not always. Like a zip code Information link on the different type of locations http://mobile.tutsplus.com/tutorials/mobile-web-apps/html5-geolocation/ Good Luck, Brandon
... View more
06-08-2012
01:42 PM
|
0
|
0
|
570
|
Title | Kudos | Posted |
---|---|---|
1 | 12-31-2020 09:02 AM | |
1 | 12-31-2020 07:21 AM | |
1 | 12-30-2020 06:50 AM | |
1 | 08-14-2014 09:34 AM | |
2 | 02-11-2013 12:14 PM |
Online Status |
Offline
|
Date Last Visited |
01-31-2024
06:45 AM
|