|
POST
|
no. check out this article from the same section of the help i linked before for more info.
... View more
06-28-2013
07:36 AM
|
0
|
0
|
1259
|
|
POST
|
as discussed in this article, when using the "on" method to connect events, a single event object is returned with event information contained within properties. this is a deviation from the old "connect" style, which utilizes positional arguments (ie. callback(result) vs. errorback(error)) here's an example of checking to see if the onUpdateEnd event for a ArcGIS DynamicMapServiceLayer returned an error
layer.on("update-end", function (returnedEvent) {
if (!returnedEvent.error == undefined){
alert("Update complete with error: " + returnedEvent.error);
}
});
... View more
06-27-2013
03:54 PM
|
0
|
0
|
1413
|
|
POST
|
good call. 🙂 i knew there was a clientside call to union somewhere, but i just couldn't remember where...
... View more
06-27-2013
11:03 AM
|
0
|
0
|
1945
|
|
POST
|
correct, the approach i outlined before just interrogates the first result in the array. in order to find the extent of all the features in the collection, you might consider looping through the results to extract an array of geometry objects and then making a call to a geometry service to union them. check out this "buffer" sample to get a general idea of how to make calls to the geometry service.
... View more
06-27-2013
10:13 AM
|
0
|
0
|
1945
|
|
POST
|
the relevant article in the help can be found here .
... View more
06-27-2013
09:01 AM
|
0
|
0
|
1241
|
|
POST
|
this sample works with an ArcGIS Server Feature Service, which means that SDE data was used to publish a map service with feature editing capability.
... View more
06-27-2013
08:57 AM
|
0
|
0
|
1259
|
|
POST
|
have you already tried calling getExtent() on the result polyline geometry and passing to map.setExtent()?
var extent = results[0].value.features[0].geometry.getExtent();
map.setExtent(extent);
... View more
06-27-2013
08:32 AM
|
0
|
0
|
1945
|
|
POST
|
have you tried moving outside the sandbox? i'm not seeing the same error once i paste my code into a new HTML file.
... View more
06-26-2013
07:23 AM
|
0
|
0
|
1264
|
|
POST
|
sorry for the delayed reply. i did some more testing and confirmed that this is a REST problem (as opposed to a problem in the JS API). it seems that currently ArcGIS Server does not honor transparency defined as an alpha value within a RGB color symbol for feature service layers. you can see this problem by removing the .TXT extension from the attached .webmap file (which has identical contents to the webmap JSON we pass to ArcGIS Server when printing) and dragging and dropping itdirectly into ArcMap.
"symbol" : {
"color" : [0, 255, 0, 128], //128 (or 50% transparency) is replaced by 255
"outline" : {
"color" : [0, 0, 0, 128], //128 (or 50% transparency) is replaced by 255
"width" : 2,
"type" : "esriSLS",
"style" : "esriSLSSolid"
},
"type" : "esriSFS",
"style" : "esriSFSSolid"
},
even though an alpha transparency of 128 is specified for the symbol fill color, the layer is completely opaque in ArcMap [ATTACH=CONFIG]25482[/ATTACH] since your sample app passes a collection of graphics instead of a feature service layer, you get around this limitation (but encounter another). ive asked the developers to update the Export Web Map Spec to acknowledge the limitation i found. sorry for the inconvenience.
... View more
06-25-2013
03:43 PM
|
0
|
0
|
5502
|
|
POST
|
you're very welcome. please consider marking this thread as "answered" 🙂
... View more
06-25-2013
11:44 AM
|
0
|
0
|
2217
|
|
POST
|
results is actually an array of features, so typing something like results.feature into the console after setting a breakpoint in the app returns "undefined". you could use results[0].feature to specify the feature in the array at index position 0 (or in english, the first result in the list), but this doesn't return a geometry object either. [ATTACH=CONFIG]25477[/ATTACH] in order to get a geometry object, you have to dig into the properties of the returned feature itself (ie. results[0].feature.geometry) the more comfortable you get navigating our API reference and using the developer tools in the browser to set breakpoints and interrogate variables, the less this stuff seems like black magic. good luck with the rest of your project!
... View more
06-25-2013
11:28 AM
|
0
|
0
|
2217
|
|
POST
|
definitely possible. in our geocoding sample, within the showResults function, we set the variable "geom" equal to the location of the returned address candidate (the location property returns a geometry object) prior to passing this information within a call to the function map.centerAndZoom(). in order to do something similar in your app, you'll have to figure out a way to get a reference to a similarly appropriate geometry object.
geom = candidate.location;
...
//first make sure that the geometry of the returned address is actually defined
if(geom !== undefined){
map.centerAndZoom(geom,12);
}
... View more
06-25-2013
09:09 AM
|
0
|
0
|
2217
|
|
POST
|
im not sure i understand what you mean by "attribute function", but you can definitely query any individual feature layer in a map service by attributes and return exact matches. the purpose of a geocoding service is to translate addresses (even when they aren't an exact match to what exists in your reference data) into the most accurate location possible. this is typically done with centerlines that have address ranges defined in the attribute table, but an address locator can also be created using point data from individual addresses.
... View more
06-25-2013
07:47 AM
|
0
|
0
|
2217
|
|
POST
|
var locator = new esri.tasks.Locator("http://ihavetherightlinkbutcannotputithere/rest/services/FeatureServer"); you can't geocode against feature services, only geocoding services.
... View more
06-24-2013
02:47 PM
|
0
|
0
|
2217
|
|
POST
|
a couple things... 1. the graphics in the sample seem to be being pulled from our own website. in the developer tools in the browser (or fiddler), can you confirm that you aren't having trouble downloading them? var fromSymbol = new esri.symbol.PictureMarkerSymbol({
...
"url":"http://static.arcgis.com/images/Symbols/Transportation/GreenSquareDaymark.png", 2. the spatial reference of the returned route itself is dictated by the properties we set when we configure the route parameters. is your new ArcGISTiledMapServiceLayer in a different coordinate system? if so, you'll have to update the line of code below. routeParams.outSpatialReference = new esri.SpatialReference({ wkid:102100 }); when i tested using one of our WGS84 services (and updated the SR to be "4326"), i saw the same error in the sandbox that you are describing, but not when i ran the same application on my own machine. im not sure whats going on there. how are you even debugging in the sandbox to determine the exact line of the error?
... View more
06-24-2013
12:41 PM
|
0
|
0
|
1264
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 04-16-2014 02:35 PM | |
| 1 | 03-15-2013 04:25 PM | |
| 1 | 06-01-2016 10:51 AM | |
| 1 | 12-28-2015 04:46 PM | |
| 1 | 12-28-2015 05:26 PM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:22 AM
|