[OpenLayers-Users] PopUp is not show
Phil Scadden
p.scadden at gns.cri.nz
Tue Apr 9 20:23:06 PDT 2013
In the mail list, the code was not distributed (I am guessing mail
clients didnt like the script tag) but saw it on nabble. This reinforces
my point. If you used firebug or developer console, you would have seen
console errors about map.addPopup as unknown method. If you then looked
at map variable in the debugger you would see it is a dom item. The
issue in the code is that in the init() function you have declared map
as a local variable
( var map = etc)
This variable is thus out of scope for the onSelect function.
Remove the "var" off the map declaration, or better (IMHO) you can
var map;
function init()
..
map = OpenLayers.map etc
...
Get used to using the debugging tools.
Notice: This email and any attachments are confidential.
If received in error please destroy and immediately notify us.
Do not copy or disclose the contents.
More information about the Users
mailing list