|
POST
|
I am using ArcGIS for Server on Windows 10.2.2. I have a cached map service and want to update the cache status with the "Manage Map Server Cache Status" tool from ArcToolbox in ArcCatalog. If I clear the area of interest (envelope) (shown in attached screen shot), I get a geoprocessing error. If I run the tool with the default values for the area of interest, the tool completes successfully... If the tool is not meant to work with a "Default" Report Extent, why am I able to clear the area of interest using the "Clear" button that is provided on the dialog? Just wondering if this is a bug! Thanks, Janice.
... View more
04-08-2015
08:46 AM
|
0
|
1
|
4492
|
|
POST
|
I am on 10.2.2 and I am having cache issues! I have tried to change the settings in my map service from "Update cache automatically" to "Update cache manually" and the change does not stick. I have the same issue when re-publishing a map document and writing over an existing service; I set the radio button to "Update cache manually" and it switches back to automatic if I change tabs/pages in the Service Editor. When I publish the service with the "Update cache manually" radio button selected, the service is published however it creates a dated copy of the service being over-written and begins to create a new cache. I do not want the cache generated. I have already created the cache and just want to update the service so that it has the changes I made to the map document and when it does create missing tiles the changes show up. Has anyone else run into this issue? Can anyone else recreate this issue? All you need to do is modify the cache setting for a cached service through ArcCatalog and check to see if the change is accepted. I have included screen shots of the service editor page I am modifying. Thanks, Janice.
... View more
04-08-2015
08:26 AM
|
0
|
2
|
4655
|
|
POST
|
OK. I got it working but find it interesting that the following code works in 3.9 with the map.infoWindow lines commented out but not in 3.10. 3.10 still adds another graphic when I click on the graphic but I do get the infoWindow. var textSymbol = new TextSymbol(address.Street, font, textColor); textSymbol.yoffset = 8; var symbol = new SimpleMarkerSymbol() .setStyle("square") .setColor(symColor); var addAtt = { "Address": address.Street, "Zip": address.ZIP }; var graphic = new Graphic(location, symbol, addAtt, infoTemplate); var textGraphic = new Graphic(location, textSymbol); map.graphics.add(textGraphic); map.graphics.add(graphic); //map.infoWindow.setTitle(graphic.getTitle()); //map.infoWindow.setContent(graphic.getContent()); //map.infoWindow.show(evt.screenPoint, map.getInfoWindowAnchor(evt.screenPoint)); What I am trying to do is reverse geocode and have a graphic with text display at the location without the infoWindow. When the user clicks on the graphic, the infoWindow displays.
... View more
03-26-2015
02:08 PM
|
0
|
0
|
445
|
|
POST
|
I have been using the reverse geocoding successfully in javascript 3.9 api. When I click on the map, a graphic is added with the text displaying the address. Then, if I click on the graphic a infoWindow opens with the Address. After switching to 3.10, I still get the graphic with the address text but instead of getting a infoWindow when I click on the graphic I get another graphic on top of the first one. The only change I have made in my application is from 3.9 to 3.10 (I also tried 3.13 with the same results as 3.10). Anyone else find this behavior?
... View more
03-26-2015
01:43 PM
|
0
|
1
|
4017
|
|
POST
|
Hi Mark, Thanks for the quick reply! I do see the connections when I use the above configuration. I see that the information is written to C:\Users\janiceb\AppData\Local\ESRI\ArcGIS Explorer\AppConfig\connecttest(1). The Connections.xml file in this location shows the connections that I see in the app. Also in the AppConfig folder I see the configuration that I built but the Connections.xml file has no connections. When I deploy my configuration file I place it in a folder that is accessible by my users and write the location to the registry on their computers. The registry entry is AppConfig under Explorer2500\Settings with the path as the value. I have successfully used this method of deployment with previous versions of Explorer. It has been a while since I have deployed a new version and may have something wrong however, the other information in the configuration is working. Just no connections. Thanks for your help, Janice.
... View more
08-05-2014
06:05 AM
|
0
|
0
|
1891
|
|
POST
|
Mark, This helped getting the connections available in the Application Configuration Manager. This did not make the connections available to my users once I deployed the configuration file. When my users run the configuration file, they see only connections they have created locally or no connections at all and must specify the information.
... View more
08-04-2014
02:59 PM
|
0
|
2
|
1891
|
|
POST
|
So I spoke with a couple of my co-workers who were in today and got the scoop on what is probably giving me issues... http://support.esri.com/en/knowledgebase/techarticles/detail/41119/?WT.mc_id=EmailCampaign15945 I heard of this long, long, ago! This has to do with creating file geodatabases on a network. I do not see the mentioned Microsoft Hot Fix on the server that I am running the script on but decided to discontinue the struggle and add the extra steps of creating my data locally and then copying it out to the network when I am done. Anyone have more news on this issue and why is it still an issue? It seems that it has been a known problem for over a year! I am using 10.1. Thanks, Janice.
... View more
06-13-2014
07:48 AM
|
1
|
0
|
2296
|
|
POST
|
James, \\skagit\dept\gis\janiceb\projects\Health\June_2014\Septic.gdb this is the location that I go to in Catalog. The script actually creates the new feature class in the geodatabase but dissolve is unable to write to it. I can use arcpy.ListWorkspaces and see the location and the file geodatabase. I can run the script with the default.gdb but not my septic.gdb. The link you provided is about Microsoft Security Essentials and I can not find that on my workstation... thanks for the info Janice.
... View more
06-12-2014
12:23 PM
|
0
|
0
|
2295
|
|
POST
|
I have a script that selects parcels within a boundary and then runs a dissolve on those parcels. I have a file geodatabase that I want to use for the output. If I have my workspace set to my default.gdb, everything works great. When I change my workspace to a different file geodatabase, I get "ExecuteError: ERROR 000210: Cannot create output" and the dissolve fails to execute. When I look into the file geodatabase, the new feature class is created but it is empty. Are there permissions or environment variables that need to be set so that I can write to a different FGDB? what am I doing wrong? Thanks, Janice. import sys, os import arcpy from arcpy import env env.overwriteOutput = True ### Set the workspace --- env.workspace = r"C:\Users\janiceb\Documents\ArcGIS\Default.gdb" ##env.workspace = r"\\skagit\dept\gis\janiceb\Projects\Health\June_2014\Septic.gdb" print env.workspace ## Parcel Layer prodParcelPolys = r"Database Connections\SQLVM3_scgis.sde\Scgis.SDEADM.Parcel_Polys" tempParcels = "Temp_Copy_of_Parcels" tempDOHParcels = "Temp_Copy_of_DOH_Parcels" ## MRA Layer prodMRAPolys = r"Database Connections\SQLVM9_Health.sde\Health.SDEADM.MarineRecoveryAreas" tempMRAs = "Temp_Copy_of_MRAs" ## Final Data to be written to file geodatabase for sharing with DOH finalDOHParcels = "ParcelsInMRA" # Make a temporary layer from the parcel feature class print(" -> Making temporary copy of the Parcel layer...") arcpy.MakeFeatureLayer_management(prodParcelPolys, tempParcels) # Make a temporary layer from the MRA feature class print(" -> Making temporary copy of the MRA layer...") arcpy.MakeFeatureLayer_management(prodMRAPolys, tempMRAs) # Select those parcels with centroid in MRA Polygons arcpy.SelectLayerByLocation_management(tempParcels, "HAVE_THEIR_CENTER_IN", tempMRAs, 5, "NEW_SELECTION") print("FYI :: Number of parcels with centroid in MRA Polygons: {0}".format(str(arcpy.GetCount_management(tempParcels).getOutput(0)))) # Dissolve the parcels in the MRA by PARCELID # This will combine parcels with duplicate parcelid values (ex: parcels divided by a road or river.) # This will give us a feature class of parcels which are located in the MRA print(" -> Dissolving by parcel id...") dissolveFields = ["PARCELID"] arcpy.Dissolve_management(tempParcels, finalDOHParcels, dissolveFields, "", "MULTI_PART", "") Total_Parcels_In_MRA = int(arcpy.GetCount_management(finalDOHParcels).getOutput(0)) print("FYI :: Number of parcels in MRA after Dissolve: {0}".format(str(Total_Parcels_In_MRA)))
... View more
06-12-2014
10:45 AM
|
0
|
4
|
3249
|
|
POST
|
How embarrassing... I totally left out a line in my python script. Everything was going great and the script was doing exactly what I told it to do... it even neglected to return the output as suggested by my spiffy coding! If you want your python to return the result, don't forget this line: # Set the output parameter to be the output file of the server job arcpy.SetParameterAsText(4, Output_File) thanks to Erwin @ esri technical support for pointing me in the right direction! Janice.
... View more
03-06-2014
04:59 AM
|
0
|
0
|
770
|
|
POST
|
I have also discovered that my custom print task will not accept changes to parameters other than scale. The print task expects the parameters as shown in the attachment and the print parameters that are supplied to the printTask execute method are also shown. The parameters are submitted to the task as entered by the user but the PrintTask creates only a PDF in Landscape (if that is how I publish the geoprocessing service). If I publish the service using Portrait orientation, I get portrait even if I submit with Landscape. I deleted all of the defaults from the script tool and republished but this did not help. I am using Layout Templates which reside on the server and at this time am only trying to print to Letter ANSI A Landscape and Letter ANSI A Portrait. I have mxd's and if I modify the mxd's and republish, my modifications show up in the print output. Maybe I need help on publishing. Maybe I need help on setting print parameters. I just know I need help! Here is the Rest Endpoint: http://www.skagitcounty.net/publicgis/rest/services/Test/AdvancedPrint/GPServer/AdvancedPrint Here is my python: import arcpy
import os
import uuid
# Input WebMap json
Web_Map_as_JSON = arcpy.GetParameterAsText(0)
# The template location in the server data store
templatePath = '//gisvm1/resources/Layout_Templates/'
# The input format for output
outputFormat = arcpy.GetParameterAsText(1)
if outputFormat == '#' or not outputFormat:
outputFormat = "PDF"
# The input layout template
templateMxd = arcpy.GetParameterAsText(2)
if templateMxd == '#' or not templateMxd:
templateMxd = "Letter ANSI A Landscape"
# Extra Parameters
# Extent
mapExtent = arcpy.GetParameterAsText(3)
# Scale
printToScale = arcpy.GetParameterAsText(4)
# Convert the WebMap to a map document
templateMxd = os.path.join(templatePath, templateMxd + '.mxd')
result = arcpy.mapping.ConvertWebMapToMapDocument(Web_Map_as_JSON, templateMxd)
mxd = result.mapDocument
# Reference the data frame that contains the webmap
# Note: ConvertWebMapToMapDocument renames the active dataframe in the template mxd to "Webmap"
df = arcpy.mapping.ListDataFrames(mxd, 'Webmap')[0]
# Set data frame scale
if printToScale and printToScale != '#':
df.scale = printToScale
# Remove the service layer
# This will just leave the vector layers from the template
#for lyr in arcpy.mapping.ListLayers(mxd, data_frame=df):
# if lyr.isServiceLayer:
# arcpy.mapping.RemoveLayer(df, lyr)
# Use the uuid module to generate a GUID as part of the output name
# This will ensure a unique output name
output = 'ap_{}'.format(str(uuid.uuid1()))
Output_File = os.path.join(arcpy.env.scratchFolder, output)
# Export the WebMap
if outputFormat == "PDF":
Output_File = Output_File + ".pdf"
arcpy.mapping.ExportToPDF(mxd, Output_File)
elif outputFormat == "JPG":
Output_File = Output_File + ".jpg"
arcpy.mapping.ExportToJPEG(mxd, Output_File)
# Clean up - delete the map document reference
filePath = mxd.filePath
del mxd, result
os.remove(filePath)
Thanks, Janice
... View more
03-04-2014
12:05 PM
|
0
|
0
|
770
|
|
POST
|
Lucas, We have our pdfs in a location that is either on the web server or somewhere accessible by the web server. So in my javascript application I have a help document that can be accessed by clicking a menu button which runs window.open(... location to help file ...). For example the location to my help file is : http://skagitcounty.net/Apps/Maps/iMap/Help/SkagitCountyiMapHelp.pdf. This is not exactly how I get to it because I use relative paths in my code and am opening an html file: function displayHelp() {
// myWindow = window.open('Help/SkagitCountyiMapHelp.pdf', '', 'target=new');
var myWindow;
try {
myWindow = window.open('/Departments/GIS/imaphelp.htm#', 'iMap Help', 'target=new, scrollbars=yes, toolbar=yes, resizable=yes');
} catch (exp) {
myWindow = window.open('/Departments/GIS/imaphelp.htm#', '', 'target=new, scrollbars=yes, toolbar=yes, resizable=yes');
}
myWindow.focus();
} I hope this helps! Janice.
... View more
03-04-2014
08:42 AM
|
0
|
0
|
617
|
|
POST
|
I have a custom PrintTask which I created following the Advanced Printing Tutorial. When I execute the PrintTask, the pdf is created and resides in the arcgisjobs folder on my GIS Server. I can open the pdf manually but I can not get it to open using window.open(result.url). The result url is null. If I examine the result object, I see that it is an esri DataFile with a url property that is null. Has anyone else created a custom PrintTask with different results? How do I get the path and file name returned when the print task completes if the result object does not have the url? Here is my code: function advancedPrint(printScale) { require(["esri/SpatialReference", "esri/tasks/PrintTask", "esri/tasks/PrintTemplate", "esri/tasks/PrintParameters"], function (SpatialReference, PrintTask, PrintTemplate, PrintParameters) { var printURL = dataLink + "/Test/AdvancedPrint/GPServer/AdvancedPrint" var printTask = new PrintTask(printURL, { async: true }); var formatOpt = getFormat(); var printLayout = getLayout(); var sr = new SpatialReference(102748); var printParams = new PrintParameters(); printParams.map = map; printParams.outSpatialReference = sr; printParams.extraParameters = { mapExtent: map.extent, printToScale: printScale }; var printTemplate = new PrintTemplate(); printTemplate.format = formatOpt; printTemplate.layout = printLayout; // "Letter ANSI A Landscape"; printTemplate.preserveScale = false; printTemplate.layoutOptions = { titleText: dijit.byId("txtPrintTitle").value, authorText: dijit.byId("txtPrintAuthor").value, copyrightText: "Copyright 2014", scalebarUnit: "Miles" }; printParams.template = printTemplate; // Progress bar var i = 0; var progressBar = dijit.byId("progressBar"); var progressGo = setInterval(function () { progressBar.set("value", i++ % 100); }, 300); setTimeout(function () { clearInterval(progressGo); }, 10000); // Execute Print Task printTask.execute(printParams, printComplete); }); } function printComplete(result) { window.open(result.url); var progressBar = dijit.byId("progressBar"); progressBar.label = "Print Complete"; } Thanks, Janice.
... View more
03-04-2014
06:50 AM
|
0
|
2
|
1660
|
|
POST
|
I added a function to handle the mouse wheel to correct this problem:
...
dojo.connect(map, "onMouseWheel", mouseWheelHandler);
...
function mouseWheelHandler(evt) {
var intDelta = evt.wheelDelta;
try {
if (intDelta < 0) {
map.setLevel(map.getLevel() - 1);
} else {
map.setLevel(map.getLevel() + 1);
}
} catch (exp) { console.debug(exp.Description); }
}
... View more
12-17-2013
08:34 AM
|
0
|
0
|
1562
|
|
POST
|
There is nothing like a weekend to give a person a fresh perspective! I got this working with the help from this thread: Trying-to-edit-a-layer-in-a-versioned-SDE-GDB-in-a-Python-stand-alone-script and correcting a couple of errors. For one: I had the wrong workspace. The next: I don't know that I can call this an error because I was using the documentation for CalculateField and passing in a VB string as the new value. This did not work. When I changed to using Python 9.3, it worked. Go figure! Here is the final bit of code that is working: outTable = "SectionsToUpdate" arcpy.MakeFeatureLayer_management(inputFeatureClass, outTable, whereClause, workspace) with arcpy.da.Editor(workspace) as edit: arcpy.CalculateField_management(outTable, fieldName, "'No'", "PYTHON_9.3") Janice.
... View more
09-09-2013
09:07 AM
|
0
|
0
|
487
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 06-15-2021 01:59 PM | |
| 2 | 01-04-2022 03:43 PM | |
| 1 | 02-02-2021 01:33 PM | |
| 1 | 01-05-2021 01:59 PM | |
| 1 | 06-13-2014 07:48 AM |
| Online Status |
Offline
|
| Date Last Visited |
01-04-2022
05:15 PM
|