|
POST
|
Yeah, the pointToExtent function isn't an ESRI API function. FWIW, here it is: function pointToExtent(map, point, toleranceInPixel) {
//Function to convert a point coordinate into a rectangle area
var pixelWidth = map.extent.getWidth() / map.width;
var toleraceInMapCoords = toleranceInPixel * pixelWidth;
toleraceInMapCoords = 1320;
return new esri.geometry.Extent( point.x - toleraceInMapCoords,
point.y - toleraceInMapCoords,
point.x + toleraceInMapCoords,
point.y + toleraceInMapCoords,
map.spatialReference
);
} You didn't post any code so I was assuming that you're using featureLayers for your layers. If you use featureLayers, you have to add the dojo.require for it: dojo.require("esri.layers.FeatureLayer");
... View more
05-08-2013
01:20 PM
|
0
|
0
|
2363
|
|
POST
|
Where are you placing your map.infoWindow.resize code? Is it within a dojo.connect for each layer? I'm doing this with version 3.3 of the API without any problems: //Listener event for feature selection and the popup info widow
dojo.connect(theUsgsLayer,"onClick",function(evt){
//Listener event for feature selection and the popup info widow
var query = new esri.tasks.Query();
query.geometry = pointToExtent(map,evt.mapPoint,15);
var deferred = theUsgsLayer.selectFeatures(query,esri.layers.FeatureLayer.SELECTION_NEW);
map.infoWindow.resize(350,300);
map.infoWindow.setFeatures([deferred]);
map.infoWindow.show(evt.mapPoint);
});
//Listener event for feature selection and the popup info widow
dojo.connect(theFloodplainLayer,"onClick",function(evt){
//Listener event for feature selection and the popup info widow
var query = new esri.tasks.Query();
query.geometry = pointToExtent(map,evt.mapPoint,15);
var deferred = theFloodplainLayer.selectFeatures(query,esri.layers.FeatureLayer.SELECTION_NEW);
//map.infoWindow.resize(map.width * 0.70, map.height * 0.6);
map.infoWindow.resize(200,175);
map.infoWindow.setFeatures([evt.graphic]);
map.infoWindow.show(evt.mapPoint);
});
... View more
05-08-2013
11:45 AM
|
0
|
0
|
2363
|
|
POST
|
IMO, not easily, no. This thread has some suggestions/code which has helped others but I did not find that it worked for me. I wish ESRI would modify the API to handle this instead of having to come up with klugy code on your own. In my futile attempts, it created more problems than it solved.
... View more
05-08-2013
10:06 AM
|
0
|
0
|
720
|
|
POST
|
Pretty sure this kind of dynamic transparency isn't supported. You either have transparency for all features in the layer or not. The only hack-ish way I can think of to do this would be something like this: At load time, get all your point features and determine how many features would go into 10%, 20%, etc groupings. Sorting your list of features by FeatureID (surrogate for feature "age"), divvy up the features into several different new arrays of features Now create new featureLayers for each individual array of features and then apply your graduating transparencey to each FeatureLayer1 (80% transparency) FeatureLayer2 (60% transparency) FeatureLayer3 (40% transparency) FeatureLayer4 (20% transparency) FeatureLayer5 (0% transparency) Hopefully you don't need to edit the features. Ugly, ugly, ugly.
... View more
05-07-2013
07:20 AM
|
0
|
0
|
525
|
|
POST
|
Ok, well, that's good to know. I looked at the API reference for mapImage and TIFF is not one of the supported data types: Known values: gif | jpg | png | bmp To use the mapImageLayer option, your GP result would have to return an image in one of those other formats. This might be a catch-22 for you IF you want the user to be able to query (i.e. display an infoWindow) the cell values. Sadly, mapImageLayers don't support this. Again, I'm stretching my knowledge base a bit with this so I'm really hoping someone from ESRI can chime in! Steve EDIT: I'm starting to think Derek is right (I really shouldn't doubt is suggestions!). Can you post more of your code, specifically the lead up to your GP service and then the callback routine for the results?
... View more
05-03-2013
02:50 PM
|
0
|
0
|
2780
|
|
POST
|
No, not quite. It's a little more complicated than that. 😄 *IF* mapImageLayer is the correct layer type to use (and again, I'm not sure it is), you would construct your layer something like this: var stormPrecipMi = new esri.layers.MapImage({
'extent': { 'xmin': -125.721041648, 'ymin': 45.1377145386, 'xmax': -119.246964944, 'ymax': 51.0722848511, 'spatialReference': { 'wkid': 4326 }},
'href': "http://radar.weather.gov/ridge/RadarImg/NTP/ATX_NTP_0.gif"
});
stormPrecipMi.height = 550;
stormPrecipMi.width = 600;
stormPrecipMi.scale = 1;
nwsStormPrecipLayer = new esri.layers.MapImageLayer({
id: 'nwsStormPrecip',
opacity: 0.5
});
nwsStormPrecipLayer.addImage(stormPrecipMi);
map.addLayer(nwsStormPrecipLayer,7); Note that you'll need to know the coordinate extent of your results (but you should know that since you're passing a shape or extent to your GP service, right?). Place the URL returned from your GP results where I have the URL under the 'href' parameter in the mapImage constructor. Hopefully someone else more knowledgable will chime in and confirm whether or not mapImageLayer is the right path to take. Steve
... View more
05-03-2013
01:04 PM
|
0
|
0
|
2780
|
|
POST
|
Possibly try debugging your code on the Blackberry device using Web Inspector? Maybe there's some sort of error that you're not aware of..
... View more
05-03-2013
12:15 PM
|
0
|
0
|
1849
|
|
POST
|
Now you're crossing into the realm of dojo.deferredLists in which you specify an list of queries to perform and then once they are all complete, a single callback function is triggered. Take a look at this sample in the API.
... View more
05-03-2013
08:34 AM
|
0
|
0
|
1333
|
|
POST
|
ESRI has some tricks up their sleeve coming up with their Javascript API which you can get a sense of here: Building 3D Web Applications with ArcGIS I don't know what their timeline is but hopefully it's sooner than later. Regarding Mike's suggestion, I suppose you can also utilize your published map service using ArcGIS Explorer if your audience does not have a license of ArcGIS Desktop.
... View more
05-03-2013
08:21 AM
|
0
|
0
|
727
|
|
POST
|
Bump. I'd like to know more about timelines for this functionality as well. My organization is in the process of developing some environmental assessments and providing a 3D viewport for our visual quality assessment would be useful.
... View more
05-03-2013
08:16 AM
|
0
|
0
|
673
|
|
POST
|
I think the syntax issue is that what's returned by your GP service isn't a dynamicMapServiceLayer. I'm not sure which of the other "layer types" that you should use but I'm going to guess that it's mapImageLayer (which incorporates mapImage).
... View more
05-02-2013
03:08 PM
|
0
|
0
|
2780
|
|
POST
|
Just got the email announcing the retirement of several services at the end of this year and want to clarify something. In one of the apps I'm developing with the JS API, I use routeTask and specify http://tasks.arcgisonline.com/ArcGIS/rest/services/NetworkAnalysis/ESRI_Route_NA/NAServer/Route as the source. Am I correct in my understanding that this service is, indeed, one of the services going away and, should I want to continue to use and ESRI provided solution, I must now use one of the subscription based services? Thanks! Steve
... View more
04-29-2013
12:19 PM
|
0
|
8
|
4778
|
|
POST
|
Depending on how many people (or divisions, etc), perhaps you can create a featureLayer for each person/grouping using a definition query on your table in the service. That way, you still use the basic classBreaksRenderer but just change the symbol used for each layer (red arrow set, green, blue, yellow, etc).
... View more
04-29-2013
09:10 AM
|
0
|
0
|
934
|
|
POST
|
How about using a classBreaksRenderer based on the rotation angle? Assign an arrow symbol based on that value. Assuming that north is zero,you would have something like: renderer.addBreak({
minValue: 0,
maxValue: 15,
symbol: symbol,
label: "North"
});
renderer.addBreak({
minValue: 16,
maxValue: 65,
symbol: symbol,
label: "Northeast"
});
renderer.addBreak({
minValue: 66,
maxValue: 115,
symbol: symbol,
label: "East"
});
renderer.addBreak({
minValue: 116,
maxValue: 155,
symbol: symbol,
label: "Southeast"
}); You get the idea... Steve
... View more
04-29-2013
08:29 AM
|
0
|
0
|
934
|
|
POST
|
Thanks, Kelly! You rock. Our server wasn't cooperating this morning but I finally was able to insert your technique into my app and it works. Thanks again! Steve
... View more
04-24-2013
12:37 PM
|
0
|
0
|
3663
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 6 hours ago | |
| 2 | 05-21-2026 01:51 PM | |
| 1 | 03-12-2026 01:43 PM | |
| 1 | 03-12-2026 08:41 AM | |
| 2 | 03-10-2026 10:10 AM |