|
POST
|
Does this imply that a separate query/query execution/info window would need to be created for each separate layer? Are there best practices/methods of achieving this? I'd be curious to see the a recommendation on best practices, too.
... View more
07-21-2011
03:29 PM
|
0
|
0
|
2058
|
|
POST
|
I'm having issues retrieving information from points and polylines queryFilter.geometry = evt.mapPoint; I think this is because the geometry of the query is a single XY location - unless you happen to hit exactly on the point or line feature, it won't return any results. You could try buffering the evp.MapPoint (the location clicked by the user) so that it used a larger area. Steve
... View more
07-21-2011
03:27 PM
|
0
|
0
|
2058
|
|
POST
|
I have a DMS setup to display 15 different layers... I would now like to add the function of displaying attributes about the features in an info window. It seems as if this isn't possible with a DMS, but is the purpose of Feature Layers... You can display an infoWindow when working with a Dynamic layer (without using a feature layer) by running a query when you click on the map, using the same URL for the query as you used for the Dynamic layer. The sample here might give some pointers. Does that help? Steve
... View more
07-20-2011
05:30 PM
|
0
|
0
|
2058
|
|
POST
|
Weird, I just noticed that I'm seeing the same behaviour on one of my maps. In my case I'm starting the legend in the onLayersAddResult (plural) event:
dojo.connect(map, 'onLayersAddResult', function (results) {
var legend = new esri.dijit.Legend({
map: map,
layerInfos: legendLayers
}, "legendDiv");
legend.startup(); Edit: - Firebug shows that legend.layerInfos[0].layer.visible = true for each layer immediately after legend.startup is run. - respectCurrentMapScale is true, but there are no scale dependencies in the layers, and they display on the map. - Omitting the layerInfos declaration doesn't change the behaviour Edit2: The sample at http://help.arcgis.com/en/webapi/javascript/arcgis/demos/widget/widget_legendvisible.html works. I based my map on this sample! Interested to see what you find... Steve
... View more
07-19-2011
04:45 PM
|
0
|
0
|
861
|
|
POST
|
Hi Derek, Are there any plans to support labelling of feature layers? Or is this too difficult/impossible on the client? Steve
... View more
07-18-2011
07:44 PM
|
0
|
0
|
904
|
|
POST
|
Yeah I personally don't like the way that Google Maps can sometimes pan unpredictably to accommodate the infoWindow, but sometimes it makes sense. Given that the infoWindow (apparently?) has four possible angles from the anchor point to the actual window, sometimes it isn't possible to show it completely within the current view without panning. I guess another option could be to do away with the anchor point and arrow, and just position it somewhere constant (eg a sidebar)
... View more
07-18-2011
06:30 PM
|
0
|
0
|
4346
|
|
POST
|
why not use map.getInfoWindowAnchor? Wouldn't that give the same coordinate as evt.screenPoint, though? And I'm not sure how it helps to determine whether the map needs to pan. Cheers, Steve
... View more
07-18-2011
06:16 PM
|
0
|
0
|
4346
|
|
POST
|
Hi Gavin, Does your point layer display correctly in snapshot mode? What about as a Dynamic layer? Could there be a scale dependency which is preventing the points from showing? Look for the Min. Scale: and Max. Scale: values in the REST services directory (eg here) Steve
... View more
07-18-2011
03:37 PM
|
0
|
0
|
1734
|
|
POST
|
Shaning, You could try joining the Google Maps API v3 group and see if anyone there knows - might be a better chance than on the ESRI group.
... View more
07-18-2011
03:32 PM
|
0
|
0
|
703
|
|
POST
|
Shaning, This might be related to your other Google Maps question. As far as I can see, the Google Maps tiled backgrounds do not work when you're running the code locally - something to do with their API not allowing intranet usage, perhaps. Try copying your files to an externally-facing web server and running the code there, to see if that helps. Steve
... View more
07-18-2011
03:29 PM
|
0
|
0
|
578
|
|
POST
|
The help file for Popup contains an apparent typo: Create a new instance of the Popup class. var popup= new esri.dijit.Popup(null,dojo.create"div"); I think this should read: var popup= new esri.dijit.Popup(null,dojo.create("div")); Steve
... View more
07-17-2011
09:50 PM
|
0
|
1
|
940
|
|
POST
|
Your code contains: map.infoWindow.resize(415,230);
map.infoWindow.show(evt.screenPoint, esri.dijit.InfoWindow.ANCHOR_UPPERRIGHT);
so it looks like you always want to show the infoWindow to the upper-right of the evt.screenPoint (the location the user clicks) and have it appear at this fixed size. You can use this logic to calculate whether the infoWindow will fit at a given point: function executeIdentifyTask(evt) {
map.graphics.clear();
//Set the infoWindow to open at the top right of the point at all times
map.infoWindow.setFixedAnchor(esri.dijit.InfoWindow.ANCHOR_UPPERRIGHT);
//Determine the upper right, and center, coordinates of the map
var maxPoint = new esri.geometry.Point(map.extent.xmax, map.extent.ymax)
var centerPoint = new esri.geometry.Point(map.extent.getCenter());
//Convert these to screen coordinates
var maxPointScreen = map.toScreen(maxPoint);
var centerPointScreen = map.toScreen(centerPoint);
//Subtract the size of the infoWindow, including a buffer.
//This will show whether the infoWindow would spill out of the current view.
var xDiff = Math.abs(maxPointScreen.x - evt.screenPoint.x) - 435;
var yDiff = Math.abs(maxPointScreen.y - evt.screenPoint.y) - 285;
//If required, recalculate a new centerpoint which accounts for the infoWindow
if (xDiff < 0) {centerPointScreen.x -= xDiff;}
if (yDiff < 0) {centerPointScreen.y += yDiff;}
//Pan the map to the new centerpoint (in Map coordinates)
centerPoint = map.toMap(centerPointScreen);
map.centerAt(centerPoint);
//Display the infoWindow at the original point clicked
map.infoWindow.show(evt.screenPoint, esri.dijit.InfoWindow.ANCHOR_UPPERRIGHT); Steve
... View more
07-17-2011
09:18 PM
|
1
|
0
|
4346
|
|
POST
|
How about moving to the full ArcGIS API for JavaScript and using this sample to get Google Maps in your JS app: http://gmaps-utility-gis.googlecode.com/svn/tags/gmapslayer/1.0/docs/examples.html This is the best of both worlds - the attractiveness of Google's base maps, with the functionality of the ArcGIS JS API. Win-win!
... View more
07-17-2011
06:06 PM
|
0
|
0
|
1263
|
|
POST
|
Shaning, See the documentation in the About section of that post. However, if apps are to deployed in Intranet, a Google Maps Premium license is still needed, which is separate from API TOU. You may need to post your sample to a public-facing web server before it will work.
... View more
07-17-2011
05:45 PM
|
0
|
0
|
1120
|
|
POST
|
I can't be the only one who wants labels on their maps. I'm interested in this, too.
... View more
07-17-2011
05:14 PM
|
0
|
0
|
904
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 11-17-2014 08:45 PM | |
| 1 | 03-15-2011 04:23 PM | |
| 1 | 10-18-2019 12:50 AM | |
| 3 | 01-22-2019 02:33 PM | |
| 1 | 09-26-2011 10:36 PM |
| Online Status |
Offline
|
| Date Last Visited |
10-20-2022
12:19 AM
|