I have a cursor on my web map used to select a location for infowindows, currently it seems to select the location within the specified tolerance of the bottom left of the cursor. I would like to have it select from the top left of the cursor if anyone can help?
I made a change to how the switching between visible services is done. I was using
map.removeAllLayers();
and changed to
map.destroy();
and the popUp (sorry about saying infoWindow) now uses the top left of the cursor. The problem then is that i then have call the init(); function which in turn sets the extent to the initial extent.
another issue i just noticed with using the map.destroy(); is that i seem to get overlaying scalebars? using the map.removeAllLayers(); doesn't give this issue??
There is definitely an interaction type issue causing it.... in my attempt to strip the file down to send it the issue disappeared...
I have attached the entire code, the loading is at line 859.
Michael,
Can you outline the steps needed to reproduce the problem using your sample code? The infoWindows are appearing in the correct position for me, as far as I can tell.
A suggestion is to load in the layers as Feature Layers. Clicking on a feature would display the popup, and would remove the need to run an Identify task.
See this map as an example. The polygons are loaded as a feature layer, and are highlighted on MouseOver. The infoWindow appears when you click on a feature - when you click off a feature, nothing happens.
This means that you don't see the "No Information Available" message when no features are found.
(If you like, I'd be happy to make a site visit to GBRMPA to assist in-person 🙂