POST
|
Can you point me to of example to get the values? I'm trying looking at documentation here GeometryService (legacy) | API Reference | ArcGIS API for JavaScript 3.17 but can figure out how to loop through lengths. I've tried geometryService.on("lengths-complete", function (result) { dojo.forEach(result.result.lengths, function (length) { alert(length); }); }); but it only returns 1 length.
... View more
07-23-2016
01:13 PM
|
0
|
1
|
869
|
POST
|
I'm using geometryService.length to get length of Polyline, I would like to get and label each of segments (paths) of the polyline. Does geometryService return the lengths of each of the paths in results?
... View more
07-21-2016
07:18 PM
|
0
|
3
|
3887
|
POST
|
I get an error the first time I execute a print task on a page. This is error I get..."RequestError: Unable to Load /proxy/...<print task url>/execute status: 404." Despite getting error the first time I execute task, it works flawlessly after that. Am I missing something? Here is code... $("#btnPrintDefault").on("click", function () { printUrl = "http://gisfarm.spokanecounty.org/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task"; var printTask = new PrintTask(printUrl); var template = new PrintTemplate(); var legendLayer = new esri.tasks.LegendLayer(); legendLayer.layerId = "roadLayer"; legendLayer.subLayerIds = [58, 117]; template.format = "PDF"; template.layout = "Letter ANSI A Landscape"; template.layoutOptions = { "titleText": "Spokane County", "scalebarUnit": "Miles", "legendLayers": [legendLayer] }; template.preserveScale = true; var params = new PrintParameters(); params.map = map; params.template = template; $('#mapPage').css("cursor", "progress"); printTask.execute(params, getPrinted, getPrintError); });
... View more
06-02-2016
02:55 PM
|
0
|
1
|
2458
|
POST
|
Is there a known issue with using Label Class and Drawing Options of Dynamic Service Layer in Windows 8 or higher? I'm changing layer label to another attribute. It works great in Windows 7 with IE 11. However doesn't work in Windows 8 or higher also using IE 11, Windows 10 devices are using IE Edge.
... View more
03-31-2016
12:03 PM
|
0
|
0
|
960
|
POST
|
Thank you Robert, The string max length on web server? Where application is or where map service is? John
... View more
03-11-2016
06:21 PM
|
0
|
1
|
398
|
POST
|
Thanks Tyrone I got it to behave the way I want. However when I add graphics to map and/or separate graphics layer they are not being redrawn correctly. They graphics are not in the correct position and are distorted. Do I need to update extent? Some other setting? $('#printPane').hide(); $('#left_col').hide(); $('#right_col').css("float", "left"); $('#right_col').css("width", "700px"); $('#right_col').css("height", "500px"); $('#map').css("float", "left"); $('#map').css("width", "700px"); $('#map').css("height", "500px"); map.width = 700; map.resize(); map.reposition();
... View more
03-11-2016
06:19 PM
|
0
|
1
|
1106
|
POST
|
I took out map.width and map.height, now map doesn't resize. The map is contained in #map, the #map div is contained in #right_col.
... View more
03-11-2016
09:05 AM
|
0
|
1
|
1106
|
POST
|
I tried making them both 500, however the map doesn't resize at all. With the code I posted the map actually resized but didn't reposition. When I do change to both to 500, and I pan just a little the map then repositions in center (does that make sense)?
... View more
03-11-2016
08:20 AM
|
0
|
1
|
1106
|
POST
|
I am trying to use PrintTask and PrintTemplate however am running into problems. If I try to print basemap or simple polygon layer such as parcels or sections it works. If I try to print anything more complex even points layer or dynamic service layer it does not work. The error is generated in Export Web Map Task. It appears it may have something to do with length of json call to Export Web Map Task... I only get error on our server. Printing works great from ArcGIS on-line samples or other examples just not on our server. Has anyone run into this situation? Is it a setting on our server?
... View more
03-11-2016
08:13 AM
|
0
|
4
|
2314
|
POST
|
I would like to resize and reposition map div and map after user clicks button. When page loads map is positioned to float right with taking up a certain % of page. I would like to reposition map to left and set size to specific #. I can move the map and resize, however the map layers do reposition in center. I'm sure I missing something. Here is my code... onClick: function () { $('#left_col').hide(); $('#right_col').css("float", "left"); $('#right_col').css("width", "500px"); $('#right_col').css("height", "500px"); $('#map').css("float", "left"); $('#map').css("width", "500px"); $('#map').css("height", "500px"); map.width = 1000; map.height = 500; map.resize(); map.reposition(); });
... View more
03-11-2016
07:55 AM
|
0
|
7
|
4447
|
POST
|
Thank you Ryan, That works great! I've spent the afternoon trying to figure out why your fiddle worked but not my map. Your example is using ArcGIS version 3.15, while I am using 3.8. It seems odd that it wouldn't work but I changed my map to version 3.15 and it works fine.
... View more
02-09-2016
04:28 PM
|
0
|
1
|
1019
|
POST
|
For example: This fires: measurement.on("measure-end", function () { alert('here1'); }); This does not: measurement.on("measure", function () { alert('here'); });
... View more
02-09-2016
02:06 PM
|
0
|
3
|
1019
|
POST
|
Thank you Ken, I actually tried both ways. Maybe I'm confusing "on connect events" with "on style events." "measure" is an "on style event" while as you point out "OnMeasureEnd" is an "on connect event." "measure-end", "measure-start" are other "on style events."
... View more
02-09-2016
01:46 PM
|
0
|
0
|
1019
|
POST
|
Thanks Ryan, That is a pretty cool widget! Do you know why the "measure" event is not firing in my situation?
... View more
02-09-2016
01:09 PM
|
0
|
6
|
1019
|
POST
|
Hi, I saw a few older posts (three years old most recent) but I would like to capture length on each segment while using Measurement tool. I thought using "measure" event would work but that doesn't seem to fire. Can you help? Here is how I am starting and capturing "measure" event... var measurement; $('#liMeasurementOn').click(function () { var divMeasure = "" $('#titlePane').append(divMeasure); $('#titlePane').show(); $('#liMeasurementOn').hide(); $('#liMeasurementOff').show(); dojo.disconnect(connects); measurement = new Measurement({ map: map, lineSymbol: measureSymbol, defaultLengthUnit: Units.FEET }, dom.byId("measurementDiv")); measurement.startup(); measurement.hideTool("location"); dojo.connect(measurement,"measure", function() { alert('here'); }); }); according to api "measure" is an event of Measurement https://developers.arcgis.com/javascript/jsapi/measurement-amd.html#event-measure
... View more
02-09-2016
12:38 PM
|
0
|
8
|
3347
|
Title | Kudos | Posted |
---|---|---|
1 | 02-04-2016 03:03 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|