|
POST
|
Thanks for all of the responses. I set a transparency for all graphics, using a opacity of .25. Here is how it turned out:
... View more
08-04-2014
08:44 AM
|
1
|
1
|
1338
|
|
POST
|
Thanks for the feedback so far. What would be the best solution to allow the user to choose from a variety of colors and have the transparency set at 50 percent? So far, I have the color palette working, yet the graphics are a solid fill. I am looking for something simple.
... View more
08-04-2014
07:19 AM
|
0
|
3
|
1338
|
|
POST
|
I am currently using the JavaScript color pallete from dijit.ColorPalette. Is there a color pallete that contains RGB values? The reason I am asking is that I want to make polygon features transparent.
... View more
08-04-2014
06:59 AM
|
0
|
6
|
3944
|
|
POST
|
Here is a sample of my code for the navigation widget. This works fine in IE 9 and IE 10, but not IE 11. Again, I am using the 3.9 API. Tool is located within the index.html page.
Icons
LINE
13 .zoominIcon {background-image:url(images/nav_zoomin.png); width:22px; height:22px; }
14 .zoomoutIcon {background-image:url(images/nav_zoomout.png); width:22px; height:22px; }
15 .zoomfullextIcon {background-image:url(images/nav_fullextent.png); width:22px; height:22px; }
16 .zoomprevIcon {background-image:url(images/nav_previous.png); width:22px; height:22px; }
17 .zoomnextIcon {background-image:url(images/nav_next.png); width:22px; height:22px; }
18 .panIcon {background-image:url(images/nav_pan.png); width:22px; height:22px; }
19 .deactivateIcon {background-image:url(images/nav_deactivate.png); width:22px; height:22px; }
Reference
LINE
177 dojo.require("esri.toolbars.navigation");
Variable
LINE
256 // Navigation Toolbar
257 var navToolbar;
Navigation Tool
LINE // Navigation Tools *
314 navToolbar = new esri.toolbars.Navigation(map);
315
316 dojo.connect(navToolbar, "onExtentHistoryChange", extentHistoryChangeHandler);
317
318 function extentHistoryChangeHandler() {
319 dijit.byId("zoomprev").disabled = navToolbar.isFirstExtent();
320 dijit.byId("zoomnext").disabled = navToolbar.isLastExtent();
321 }
Webpage
LINE
<!-- DEFINES NAVIGATION TOOLBAR -->
<div id="navToolbar" class="header" data-dojo-type="dijit.layout.ContentPane" dojoType="dijit.Toolbar" data-dojo-props="region:'top'" >
<div id="zoominToolFrame">
<div dojotype="dijit.form.Button" title="Zoom In" id="zoomin" iconClass="zoominIcon" onClick="navToolbar.activate(esri.toolbars.Navigation.ZOOM_IN);"></div>
</div>
<div id="zoomoutToolFrame">
<div dojotype="dijit.form.Button" title="Zoom Out" id="zoomout" iconClass="zoomoutIcon" onClick="navToolbar.activate(esri.toolbars.Navigation.ZOOM_OUT);"></div>
</div>
<div id="zoomfullextentToolFrame">
<div dojotype="dijit.form.Button" title="Zoom to Full Extent" id="zoomfullextent" iconClass="zoomfullextIcon" onClick="navToolbar.zoomToFullExtent();"></div>
</div>
<div id="zoomprevToolFrame">
<div dojotype="dijit.form.Button" title="Zoom to Previous Extent" id="zoomprev" iconClass="zoomprevIcon" onClick="navToolbar.zoomToPrevExtent();"></div>
</div>
<div id="zoomnextToolFrame">
<div dojotype="dijit.form.Button" title="Zoom to Next Extent" id="zoomnext" iconClass="zoomnextIcon" onClick="navToolbar.zoomToNextExtent();"></div>
</div>
<div id="panToolFrame">
<div dojotype="dijit.form.Button" title="Pan" id="pan" iconClass="panIcon" onClick="navToolbar.activate(esri.toolbars.Navigation.PAN);"></div>
</div>
<div id="deactivateToolFrame">
<div dojotype="dijit.form.Button" title="Deactivate Navigation Tools" id="deactivate" iconClass="deactivateIcon" onClick="navToolbar.deactivate()"></div>
</div>
<div id="cleargraphicsToolFrame">
<div dojotype="dijit.form.Button" title="Clear Grapics" id="cleargraphics" iconClass="cleargraphicsIcon"></div>
</div>
<div id="idenitfyFormButtonToolFrame">
<div dojotype="dijit.form.Button" title="Identify Feature" id="idenitfyFormButton" iconClass="identifyIcon" onClick="identifyTool()"></div>
</div>
<div id="editFormButtonToolFrame">
<div dojotype="dijit.form.Button" title="Data Editor Form" id="editFormButton" iconClass="editattributesIcon" onClick="editTool()"></div>
</div>
... View more
06-25-2014
11:44 AM
|
1
|
1
|
761
|
|
POST
|
I have been testing a JavaScript application in Internet Explorer version 11. I am using the navigation tools widget. For some reason, when drawing an extent box for the zoom in or zoom out, the box does not appear. By default, in I.E. 9 and 10 the extent box outline displays in red with a greyish transparent box. Anyone else have this issue? I am using JavaScript API version 3.9. The zoom draw outline shows up in Google Chrome and FireFox. Any help or ideas will greatly be appreciated.
... View more
06-24-2014
01:55 PM
|
0
|
2
|
4010
|
|
POST
|
Hi Ian- Typically what you are seeing are the results of small syntax changes in dojo. Plus keep in mind your meta tag name and content properties have to be set up as well. I have had issues with certain dijits not displaying correctly in IE 8 and lower. Nevertheless, I've been able to migrate all of my html divs, etc since 3.5 and am using 3.9 now. Here is a sample from a simple lookup app: <div id="bcMain" data-dojo-type="dijit/layout/BorderContainer" data-dojo-props="design:'sidebar', gutters: 'true', liveSplitters:'true'">
<div id="cpLeading" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="splitter:'true', region:'leading'">
<div data-dojo-type="dijit/layout/AccordionContainer">
<div id="legendPane" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="title:'Half Sections', selected:true">
<div id="leftInstruct">Check layers on and off.</div>
<div id="tocDiv"></div>
</div>
<div id="findPane" data-dojo-type="dijit/layout/AccordionPane" data-dojo-props="title: 'Search Tools', selected:false">
<select id="comboSelect"> <!--data-dojo-type="dijit/form/ComboBox">-->
</select>
<button id="search" data-dojo-type="dijit/form/Button" type="button" data-dojo-attach-point="button" >Search
</button>
</div>
</div>
</div>
<div id="cpCenter" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region: 'center'">
<div id="divSearch"></div>
<div id="HomeButton"></div>
<div id="LocateButton"></div>
<div style="position:absolute; right:20px; top:10px; z-Index:999;"><!--"tpBaseMap" data-dojo-type="dijit/TitlePane" -->
<div data-dojo-type="dijit/TitlePane"
data-dojo-props="title:'Change Basemap', closable:false, open:false">
<div data-dojo-type="dijit/layout/ContentPane" style="width:275px; height:100px; overflow:auto;"><!--style="width:380px; height:280px; overflow:auto;"> 275px for 2-->
<div id="basemapGallery"></div></div>
</div>
</div>
</div>
<div id="cpTop" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'top'"> <!--splitter: 'true', -->
<img src="css/sclogoHeaderOnly.png" alt="ScLogo" width="120" height="45"align="left"/>Sarasota County Half Sections
<div id="subheader2">Click on Sections for Sheet Info</div>
<div id="subheader3"></div>
<div id="subheader4">941-861-5000</div>
</div>
<!--<div id="cpBottom" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="splitter: 'false', region: 'bottom'">
<div id="divGrid"></div>
</div>-->
</div> Thanks David Hmm.. I looked at your code and it looks similar to what I have. Do you have any other examples? You mentioned meta tag name and content properties. Do you have an example? Are there any references on the changes between versions?
... View more
06-19-2014
08:29 AM
|
0
|
0
|
563
|
|
POST
|
I have recently installed the latest JS API version 3.9 up from version 3.5. I have an application that contains tabs where all of the tools are located. I have created a content pane with an accordion container. Has something changed between the 3.5 and 3.9 API? The application loads fine, but when clicking on each tab, the frame for the tools are not inside the tab when using the 3.9 version of the API. The code I use in the index.htm and layout.css is exactly the same. Below are some screenshots and a block of code. Does anyone have any ideas? Below is some of the code that contains the content and accordion pane. Incorrect Display: [ATTACH=CONFIG]34739[/ATTACH] Correct Display: [ATTACH=CONFIG]34740[/ATTACH] Here is the block of code I use within the index.htm:
<!-- TABLE OF CONTENTS -->
<div id="leftPane" data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'left'" splitter="true">
<div data-dojo-type="dijit.layout.AccordionContainer" id="accordion" onfocus="Text1ToolWrapper">
<!-- MAP LAYERS -->
<div data-dojo-type="dijit.layout.ContentPane" id="maplayersPane" title="Map Layers" style="background-color: #FFFFFF">
<div id="tocDiv"></div>
</div>
<!-- DRAWING TOOLS -->
<div data-dojo-type="dijit.layout.ContentPane" id="drawingPane" title="Drawing Tools">
<div id="drawingtoolspointsframe">
<div id="drawingtoolspointstitle"><center><b>Draw Points</b></center></div>
<div id="drawingtoolspointstext">
To draw a point, use a single left mouse click on the map.
</div>
<div id="drawingtoolspointtoolsbuttonframe">
<center>
<button data-dojo-type="dijit.form.Button" onClick="Point1ToolWrapper" id= What do I need to change to get the frame containing the tools within the tab? Any help that can be provided will be appreciated.
... View more
06-19-2014
05:50 AM
|
0
|
2
|
918
|
|
POST
|
You might find these samples useful: https://developers.arcgis.com/javascript/jssamples/util_project.html https://developers.arcgis.com/javascript/jssamples/util_coordinate_converter.html Thanks for the sample, however that is more of a point and click to get the coordinates. I need a window that allows the user to enter in the coordinates, then hit a button to execute. Something like the screenshot attached. [ATTACH=CONFIG]34142[/ATTACH]
... View more
05-28-2014
09:47 AM
|
1
|
4
|
2689
|
|
POST
|
Has anyone built a find coordinates tool for a JavaScript application? I have a python script built to do this for the Silverlight Viewer, but now I am interested in building a find coordinates tool for our JavaScript applications. Right now, I am using the 3.5 API legacy code, but plan to upgrade to 3.9 really soon. The tool needs: Input X: Input Y: as the parameters and I am hoping if possible to use a geometry service to locate the point on the map with a marker symbol and perhaps a label. The tool will also need to convert the coordinates from state plane coordinates to decimal degrees. Are there any samples out there or does anyone have any ideas? Any feedback will greatly be appreciated. Thanks.
... View more
05-28-2014
07:49 AM
|
0
|
13
|
7990
|
|
POST
|
Owen, your support solved my issue. Thank you very much!
... View more
05-27-2014
05:21 AM
|
0
|
0
|
1302
|
|
POST
|
I don't think the issue is with the locator, it looks like the schema lock is happening when the second process attempts to copy rows to the DBF file: CRWInspectionLogCopyRows = os.path.join(scratch,CRWInspectionLogCopyRows.dbf)
...
if result == 0:
arcpy.AddWarning("Process terminated."); sys.exit()
else:
# The next line is probably the cause of the schema lock:
arcpy.CopyRows_management(CRWInspectionLog, CRWInspectionLogCopyRows, "") The DBF file will be locked by the first process and the second process will not be able to write to the same file while it is open. In your script this file would be the same for all users: E:\geoprocessing\Building\Outputworkspace\CRWInspectionLogCopyRows.dbf To avoid this on the server you should remove the line that specifically sets the scratchWorkspace: # 2. Set geoprocessing environment
scratch = arcpy.env.scratchWorkspace
arcpy.env.scratchWorkspace = r"E:\geoprocessing\Building\Outputworkspace" # - REMOVE this line
arcpy.env.overwriteOutput = True Change to: # 2. Set geoprocessing environment
scratch = arcpy.env.scratchFolder
arcpy.env.overwriteOutput = True Then when simultaneous users run the script they each get a system generated job/scratch directory and the DBF files can be created without any locking issues. Alternatively, you could use some random temp file name for each DBF if you want to keep your specific scratchWorkspace. This way each process is writing to a different DBF file. Hope this helps. Owen www.spatialxp.com.au Owen, so you think removing the second line will solve the issue? This tool worked before. When I first run the tool in ArcGIS Desktop, I don't need to set a scratch workspace? Everything else looks correct? The output references a layer file on the e drive. That should be acceptable correct?
... View more
05-26-2014
04:18 PM
|
0
|
0
|
1302
|
|
POST
|
I will add that the locator I am using is not coming from SDE. It is a standalone locator that pull data from SDE. Could that be the issue? Here is my code: # 1. Import arcpy module import arcpy, os, sys, datetime from arcpy import env # 2. Set geoprocessing environment scratch = arcpy.env.scratchWorkspace arcpy.env.scratchWorkspace = r"E:\geoprocessing\Building\Outputworkspace" arcpy.env.overwriteOutput = True # 3. Specify Date and Time now = datetime.datetime.now() # 4. Input Parameters Initials = arcpy.GetParameterAsText(0) InspDate = arcpy.GetParameterAsText(1) if InspDate == "": InspDate = now.strftime("%m-%d-%y") #This will return today's date. arcpy.AddMessage("Searching for scheduled inspections...") Xpression = """ "INSPECTOR" = \'%s\' AND "SCHEDULED_DATE" = \'%s\' """ % (Initials, InspDate) # 5. Local variables: sde_sdegis_VCOE_CRWINSPECTIONLOG = r"e:\connections\AGSGIS_TO_SDEGIS_COE.sde\\sde.sdegis.VCOE_CRWINSPECTIONLOG" CRWInspectionLog = "CRWInspectionLog" CRWInspectionLogCopyRows = os.path.join(scratch,CRWInspectionLogCopyRows.dbf) AddressesWithBldgno = r"e:\locators\\AddressesWithBldgNo" ScheduledInspections = os.path.join(ScheduledInspections.shp) # 6. Make Query Table and Copy Rows if Result is greater than 0 arcpy.AddMessage("Selecting scheduled inspections...") arcpy.MakeQueryTable_management(sde_sdegis_VCOE_CRWINSPECTIONLOG, CRWInspectionLog, "NO_KEY_FIELD", "", "", Xpression) result = int(arcpy.GetCount_management(CRWInspectionLog).getOutput(0)) arcpy.AddMessage("Inspections Found: " + str(result)) if result == 0: arcpy.AddWarning("Process terminated."); sys.exit() else: arcpy.CopyRows_management(CRWInspectionLog, CRWInspectionLogCopyRows, "") del CRWInspectionLog # 7. Geocode Inspections arcpy.AddMessage("Geocoding inspections, please wait...") arcpy.GeocodeAddresses_geocoding(CRWInspectionLogCopyRows, AddressesWithBldgno, Street SITE_ADDR VISIBLE NONE;City <None> VISIBLE NONE, ScheduledInspections, "STATIC") result1 = int(arcpy.GetCount_management(ScheduledInspections).getOutput(0)) arcpy.AddMessage("Inspections Geocoded: " + str(result1)) if result1 < result: arcpy.AddWarning("Not all inspections were mapped.") else: arcpy.AddMessage("All inspections mapped.") # 8. Scheduled Inspections Output arcpy.SetParameterAsText(2, ScheduledInspections)
... View more
05-26-2014
06:20 AM
|
0
|
0
|
583
|
|
POST
|
When running a GP service on the server, the scratch workspace is created under a job directory. For example:
http://[server]/arcgis/rest/directories/arcgisjobs/lotexport_gpserver/j52e4e3ec1ff741e9aad19b8263615232/scratch/WebMap_12345.pdf
^
(Job ID)
Your script may be overriding this and attempting to use the same scratch workspace for simultaneous users - leading to the schema lock. The code that produced the URL result above just uses the scratchFolder as the directory in which to create the PDF file: fn = 'WebMap_{0}.pdf'.format(str(id))
out_fn = os.path.join(arcpy.env.scratchFolder, output) If you create your temporary data in the arcpy.env.scratchFolder then the server should create unique datasets and avoid any schema locks. Owen I was also thinking, the locator I am using is not in SDE. It is a standalone locator that pulls data from SDE. Could that be part f the problem? Should I point to the locator from SDE rather than a standalone locator on the server? Here is my code. What would need to be changed? # 1. Import arcpy module
import arcpy, os, sys, datetime
from arcpy import env
# 2. Set geoprocessing environment
scratch = arcpy.env.scratchWorkspace
arcpy.env.scratchWorkspace = r"E:\geoprocessing\Building\Outputworkspace"
arcpy.env.overwriteOutput = True
# 3. Specify Date and Time
now = datetime.datetime.now()
# 4. Input Parameters
Initials = arcpy.GetParameterAsText(0)
InspDate = arcpy.GetParameterAsText(1)
if InspDate == "":
InspDate = now.strftime("%m-%d-%y") #This will return today's date.
arcpy.AddMessage("Searching for scheduled inspections...")
Xpression = """ "INSPECTOR" = \'%s\' AND "SCHEDULED_DATE" = \'%s\' """ % (Initials, InspDate)
# 5. Local variables:
sde_sdegis_VCOE_CRWINSPECTIONLOG = r"e:\connections\AGSGIS_TO_SDEGIS_COE.sde\\sde.sdegis.VCOE_CRWINSPECTIONLOG"
CRWInspectionLog = "CRWInspectionLog"
CRWInspectionLogCopyRows = os.path.join(scratch,CRWInspectionLogCopyRows.dbf)
AddressesWithBldgno = r"e:\locators\\AddressesWithBldgNo"
ScheduledInspections = os.path.join(ScheduledInspections.shp)
# 6. Make Query Table and Copy Rows if Result is greater than 0
arcpy.AddMessage("Selecting scheduled inspections...")
arcpy.MakeQueryTable_management(sde_sdegis_VCOE_CRWINSPECTIONLOG, CRWInspectionLog, "NO_KEY_FIELD", "", "", Xpression)
result = int(arcpy.GetCount_management(CRWInspectionLog).getOutput(0))
arcpy.AddMessage("Inspections Found: " + str(result))
if result == 0:
arcpy.AddWarning("Process terminated."); sys.exit()
else:
arcpy.CopyRows_management(CRWInspectionLog, CRWInspectionLogCopyRows, "")
del CRWInspectionLog
# 7. Geocode Inspections
arcpy.AddMessage("Geocoding inspections, please wait...")
arcpy.GeocodeAddresses_geocoding(CRWInspectionLogCopyRows, AddressesWithBldgno, Street SITE_ADDR VISIBLE NONE;City <None> VISIBLE NONE, ScheduledInspections, "STATIC")
result1 = int(arcpy.GetCount_management(ScheduledInspections).getOutput(0))
arcpy.AddMessage("Inspections Geocoded: " + str(result1))
if result1 < result:
arcpy.AddWarning("Not all inspections were mapped.")
else:
arcpy.AddMessage("All inspections mapped.")
# 8. Scheduled Inspections Output
arcpy.SetParameterAsText(2, ScheduledInspections)
How would I add in your code to stop the schema lock?
... View more
05-26-2014
06:14 AM
|
0
|
0
|
1302
|
|
POST
|
I have a question. I have created a python tool that has two input parameters. These parameters include (input initials) and (input date). After these parameters are entered in the tool runs and maps building inspections. The output results show a colored point wiwith the matching colored label based on the input initials. The tool runs fine in desktop and publishes to ArcGIS Server. In ArcGIS Server, the tool runs well, but when another user runs the tool simultaneously, both user get schema locks in regards to the geocoding service causing the tool to fail. How can I prevent these schema locks? The weird thing is that this tool worked before. I am running ArcGIS Server 10.1 SP1. This is how my locator is called out within the tool: AddressesWithBldgNo = r"e:\locators\AddressesWithBldgNo" scratch workspace is set when I run the tool = e:\outputworkspace I have a share set up. Why would I get a schema lock? How can I use the address locator without getting a schema lock when multiple users are hitting GP service. Any help will greatly be appreciated. Here is a screenshot of the error message I am getting in the Silverlight Application.[ATTACH=CONFIG]34071[/ATTACH] Ian
... View more
05-25-2014
12:06 PM
|
0
|
5
|
2470
|
|
POST
|
I have a question. I have created a python tool that has two input parameters. These parameters include (input initials) and (input date). After these parameters are entered in the tool runs and maps building inspections. The output results show a colored point wiwith the matching colored label based on the input initials. The tool runs fine in desktop and publishes to ArcGIS Server. In ArcGIS Server, the tool runs well, but when another user runs the tool simultaneously, both user get schema locks in regards to the geocoding service causing the tool to fail. How can I prevent these schema locks? The weird thing is that this tool worked before. I am running ArcGIS Server 10.1 SP1. This is how my locator is called out within the tool: AddressesWithBldgNo = r"e:\locators\AddressesWithBldgNo" scratch workspace is set when I run the tool = e:\outputworkspace I have a share set up. Why would I get a schema lock? How can I use the address locator without getting a schema lock when multiple users are hitting GP service. Any help will greatly be appreciated. Ian
... View more
05-23-2014
05:38 PM
|
0
|
1
|
805
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 04-01-2022 05:53 AM | |
| 1 | 09-18-2018 06:17 AM | |
| 1 | 06-19-2018 10:31 AM | |
| 1 | 05-15-2018 10:42 AM | |
| 1 | 10-14-2015 03:59 PM |
| Online Status |
Offline
|
| Date Last Visited |
06-10-2025
07:13 AM
|