|
POST
|
Hello- If anyone can provide assistance with the following code, that would be great. The code works, a route is defined using our internal NA, but does not draw a graphic route upon returning results. I feel certain I have mis-called the route results, and/or am not passing in graphics correctly. Here is the code. It is culled from the existing sample, I have attempted to update syntax to 1.9 var mapMain, routeTask, routeParams, stopSymbol, routeSymbol, lastStop; // @formatter:off require([ "esri/map", "esri/geometry/Extent", "esri/graphic", "esri/symbols/SimpleMarkerSymbol", "esri/symbols/SimpleLineSymbol", "esri/tasks/FeatureSet", "esri/tasks/RouteTask", "esri/tasks/RouteParameters", "esri/tasks/RouteResult", "esri/units", "dojo/parser", "dojo/ready", "dojo/_base/Color", "dijit/layout/BorderContainer", "dijit/layout/ContentPane"], function( Map, Extent, Graphic, SimpleMarkerSymbol, SimpleLineSymbol, FeatureSet, RouteTask, RouteParameters, RouteResult, Units, parser, ready, delcare, Color, BorderContainer, ContentPane ) { ready(function() { mapMain = new Map("cpCenter", { basemap : "streets", extent : extentInitial, lods : myLods, showAttribution: false, }); mapMain.on("click", addStop); routeTask = new RouteTask("https://ags2.scgov.net/arcgis/rest/services/ScOperational/RoutingService/NAServer/Route"); routeParams = new RouteParameters(); routeParams.attributeParameterValues = [{attributeName: "Oneway", parameterName: "Restriction Usage", value: "Prohibited"}, {attributeName: "RestrictedTurns", parameterName: "Restriction Usage", value: "Prohibited"}]; routeParams.outSpatialReference = mapMain.SpatialReference; routeParams.returnRoutes = true; routeParams.returnStops = true; routeParams.returnDirections = true; routeParams.directionsLengthUnits = Units.MILES; routeParams.impedanceAttribute="Length"; routeParams.stops = new FeatureSet(); routeTask.on("solve-complete", showRoute); routeTask.on("error", errorHandler); function addStop(evt) { stopSymbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_CROSS, 20, new SimpleLineSymbol( SimpleLineSymbol.STYLE_SOLID, new Color([89, 95, 35]), 2 ), new Color([130, 159, 83, 0.40]) ); var stop = new Graphic(evt.mapPoint, stopSymbol); mapMain.graphics.add(stop); routeParams.stops.features.push(stop); if (routeParams.stops.features.length >= 2) { routeTask.solve(routeParams); lastStop = routeParams.stops.features.splice(0, 1)[0]; //what does? } console.log(lastStop); } function showRoute(solveResult) { routeSymbol = new SimpleLineSymbol(SimpleLineSymbol.STYLE_DASH, new Color([254, 0, 0]), 3); mapMain.graphics.add(solveResult.routeResults[0].route.setSymbol(routeSymbol)); } function errorHandler(err) { alert("An error occured\n" + err.message + "\n" + err.details.join("\n")); routeParams.stops.features.splice(0, 0, lastStop); mapMain.graphics.remove(routeParams.stops.features.splice(1, 1)[0]); } }); }); Thanks David
... View more
10-14-2013
11:13 AM
|
0
|
4
|
3499
|
|
POST
|
Hi all- For those that are interested, it would appear that the parseOnLoad option must be set within the dojoConfig section when configured for asynchronous module loading in your index.html at 3.7: <script> var dojoConfig = { async : true, parseOnLoad : true }; </script> As such, I would consider this thread answered David
... View more
10-04-2013
11:23 AM
|
0
|
0
|
1149
|
|
POST
|
Hi all, I'm noticing an exent shift upon map load event at the 3.7 api that was not present at the 3.6 api. For example, the exent: var extentWM = new Extent({ "xmin": -9223319.21340548, "ymin": 3108650.4632008513, "xmax": -9102472.271686783, "ymax": 3178361.032996838, "spatialReference" : { "wkid" : 102100 } }); seems to shift my map some 40 km south of where it should be on load. A tiled and dynamic map service are both configured as web mercator. If anyone has any ideas, that would be great. Thanks, David
... View more
10-03-2013
11:12 AM
|
0
|
3
|
1362
|
|
POST
|
Hi Jeff- Last week I was testing, getting funny results with my Extent vars in 3.7, haven't been able to figure it out yet. So while I didn't think the api was broken, nor did I try to download it, I couldn't figure out the shift I was seeing in my 3857 wkid at 3.7 David
... View more
10-01-2013
11:33 AM
|
0
|
0
|
2924
|
|
POST
|
Hi Jeff- I'm working with a FeatureLayer for Sarasota County Evacuation Zones app, and am curious about the maxAllowableOffset parameter at 3.6. I'm having some performance issues with the surge layer, and I believe that at 3.6 this value is auto-calculated upon an extent change. Is there a better way to set it explicitly? Thanks David
... View more
09-13-2013
09:23 AM
|
0
|
0
|
1178
|
|
POST
|
Yes, yes, yes, well described . . . and thanks again. I'll let you get back to your 3.4 changes 🙂
... View more
07-11-2013
10:13 AM
|
0
|
0
|
2432
|
|
POST
|
Thanks Robert, works like a charm. Let's see, if I'm following the programming logic correctly, the original variable typeID string in the layerDetails if block is set to return the attributes of any given field and when employed on a subtype field or codedDomain field the reutrn will be descriptions as designed. But when both subtypes and coded val domains descriptis are to be returned, the typeID has to essentially be cleared first, then set to return the decripts and not the codes... Anyway, hope I haven't embarrased myself to badly here, please feel free to correct me and it's always a pleasure working with you. I'll shoot you a url when I put up a release build-- Thanks Again- David
... View more
07-11-2013
08:57 AM
|
0
|
0
|
2432
|
|
POST
|
Hi Robert- Thanks for the reply. Yeah, For us here in southwest Florida, hurricane season preparations tends to backlog my update frequency. Yes I am using the source code version if I understand you correctly, although I typically download from the eSearch.zip Code Attachement download section, and not from github. I'll be updating to 3.4 very shortly, and so wasn't going to spend alot of time on this, unless you had something already forked on github for this version, or had could direct me to a particular function in the mxml.
... View more
07-11-2013
06:54 AM
|
0
|
0
|
2432
|
|
POST
|
Hey Robert, sure thing. I am going to go ahead and un-secure this service: https://ags2.scgov.net/arcgis/rest/services/ScOperational/SCDataAgol/MapServer and then let's work with the Parks layer at: https://ags2.scgov.net/arcgis/rest/services/ScOperational/SCDataAgol/MapServer/25 If that's ok with you. I can leave it unsecure throughout the day oon 7/11/2013 The subtype field is 'ParkType', the 'PublicAccess' field has the coded domain values. I am not utilizing the coded domain field as as a search, but am returning its values. Perhaps it is the fact that these domain values are inherited? Thanks, looking forward to your reply-- Here is my full layer xml section for this layer: <layer> <token/> <useproxy>false</useproxy> <definitionexpression></definitionexpression> <enableprintgrid title="Selected Parks">true</enableprintgrid> <enableexport>true</enableexport> <name>Sarasota County Parks</name> <url>https://ags2.scgov.net/arcgis/rest/services/ScOperational/SCDataAgol/MapServer/25</url> <expressions> <expression alias="Park Type" textsearchlabel="Search by Park Type:" isvaluerequired="false"> <values> <value prompt="Example: Natural Area Park" field="ParkType" usesubtype="true">ParkType = [value]</value> </values> </expression> <expression alias="Park Name" textsearchlabel="Search by Park Name:" isvaluerequired="true"> <values> <value prompt="Example: Nathen Benderson Park" uniquevalsfromfield="ParkName">ParkName = '[value]'</value> </values> </expression> </expressions> <graphicalsearchlabel>Use one of the graphical search tools to select Parks</graphicalsearchlabel> <spatialsearchlayer>false</spatialsearchlayer> <titlefield>ParkType</titlefield> <fields all="false"> <field name="ParkType" alias="Park Type" gridfield="true" /> <field name="ParkName" alias="Park Name" gridfield="true" /> <field name="Address" alias="Address" gridfield="true" /> <field name="Phone" alias="Phone Number" gridfield="true" /> <field name="PublicAccess" alias="Public Access" gridfield="true"/> </fields> <!--<links></links>--> <zoomscale usegeometry="true" zoompercent="1.6" /> <autoopendatagrid>true</autoopendatagrid> <relates> <relate id="2" label="Parks Information" enableexport="true" icon="assets/images/i_table.png"> <fields all="false"> <field name="ADA_Access" alias="Is ADA Accessible" /> <field name="Concession" alias="Has Concesssions" /> <field name="Restrooms" alias="Has Restrooms" /> <field name="Showers" alias="Has Showers" /> <field name="Playgrounds" alias="Has Playgrounds" /> <field name="AthleticCourts" alias="Has Courts" /> <field name="AthleticFields" alias="Has Ball Fields" /> <filed name="CanoeKayakLaunch" alias="Has Kayak Launch" /> <field name="BoatAccess" alias="Has Boat Access" /> <field name="PicnicArea" alias="Has Picnic Areas" /> <field name="CampingArea" alias="Has Camping" /> </fields> </relate> </relates> </layer>
... View more
07-10-2013
12:56 PM
|
0
|
0
|
2432
|
|
POST
|
Hi Robert- I aplogize for potentially being in the wrong thread. I was wondering if you had any difficulites in displaying coded values in either the primary feature class or related table when using the Enhanched Search Widget: Version: 3.2.1 Build Date: 4/1/2013 I seem to be having difficulty displaying domain descriptions in fields that use coded value domains when I am also utililizing the usesubtype="true" setting. Any insight is appreciated and btw nice meeting you at the Dev Conference in March this year thanks David Coley Sarasota County GIS Sarasota County, FL
... View more
07-09-2013
12:42 PM
|
0
|
0
|
3624
|
|
POST
|
Actually, no. I don't think the absence or precence of a global ID on the AOI layer should affect data access or tile worker processes. But different index types could (ie sql geometry spatial indices vs an FDO_index in a file gdb). So after my original reply it occured to me that since the caching errors are occuring when using an area of interest, and for the first time I am seeing a TileWorker error along with an index error, I believe that different index types are not being handled by the Tile Worker process. So potential solution then: Either place all data to be cached in an fdgb, including the AOI poly; OR place the AOI poly in sde in sde as well, where it can utilize the same type and size of spatial index. This was never a problem for us when using Arc Binary storage type, but since we moved to Sql Geometry apparently it is. Thanks David
... View more
07-01-2013
09:06 AM
|
0
|
0
|
2296
|
|
POST
|
I too am receiving very similar errors when using an area of interest file gdb polygon: Data access failure, layer = Roads and Streets, error string = Underlying DBMS error [Microsoft SQL Server Native Client 10.0: The query processor could not start the necessary thread resources for parallel query execution.] [PROD.GIS.Streets]§TilesWorker: Data access failure, layer = Roads and Streets, error string = Could not access data for layer or table Roads and Streets during drawing Failed to cache extent: 504171.875000 1009371.875000 538294.791667 1043494.791667 at scale 1200 Failed to cache extent: 606569.270833 992302.604167 623630.729167 1009364.062500 at scale 600 Data access failure, layer = Roads and Streets, error string = Underlying DBMS error [Microsoft SQL Server Native Client 10.0: The query processor could not start the necessary thread resources for parallel query execution.] [PROD.GIS.Streets]§TilesWorker: Data access failure, layer = Roads and Streets, error string = Could not access data for layer or table Roads and Streets during drawing Failed to cache extent: 623635.937500 1043502.604167 640012.968249 1060564.062500 at scale 600 The index was either too large or too small. However, as you can read the errors also involve TileWorker Process and Data access failures from SDE. Once I dumped our streets into a file gdb in a shared directory, no errors. I've been fighting data access failures since we went to 10.1.1 and sql geometry. We have spent hours tuning and testing, and yet the same errors keep cropping up. Our database server is connected to our san via failover nic cards, we have 16 cores on two cpus with 65gb ram. This should not be happening! Thanks David Coley Sarasota County ArcServer Admin / Developer
... View more
07-01-2013
07:40 AM
|
0
|
0
|
2296
|
|
POST
|
Hi Christine, that makes perfect sense, I didn't realize you meant the APUNIQUEID and LAYERKEYTABLE objects. I should be all set then, thanks for your time!
... View more
04-10-2013
09:04 AM
|
0
|
0
|
1494
|
|
POST
|
Hi Christine- thanks for your reply, I just returned from the dev summit or I would have gotten back to you sooner. Um, I'm not certain I was clear with my request. Do you mean to say 'tables that contain the unique HydroID' rather than 'Unique ID tables'? I ask because I'm not familiar with 'Unique ID tables' as part of the full ArcHydro schema; I've never seen those objects. Regardless, we'll test out populating HydroIDs on those objects that the tools require once we version the schema- Thanks David
... View more
04-02-2013
10:42 AM
|
0
|
0
|
1494
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | Monday | |
| 1 | 2 weeks ago | |
| 2 | 3 weeks ago | |
| 1 | 03-27-2026 01:27 PM | |
| 2 | 03-25-2026 06:29 AM |
| Online Status |
Offline
|
| Date Last Visited |
Friday
|