[OpenLayers-Users] Re load map from external function and make a layer visible

S.Reena reena at indiamail.com
Fri Oct 24 07:26:47 EDT 2008


Hi ,

I have made this layer in init() which I am calling when body loads in
map.html

 wms[8] = new OpenLayers.Layer.WMS.Untiled(
                 
"query1","http://gis.rtbi-iitm.in/cgi-bin/mapserv?map=/var/www/html/v2/mapfile/query1.map",
                  
{'layers':"query1",'transparent':"true"},{'displayInLayerSwitcher':true},{'isBaseLayer':false});

wms[8].setVisibility(false);

This mapfile uses query table in database.
 
I have used map div for map and call a php page on a div 'popup' so that it
makes 'map' div hidden and after the table creation it makes 'popup' div 
hidden and makes 'map' div visible so that they both can come one onto the
other.
 
Now in some other function showmap() I am changing that query table using
php and making 

wms[8]. setVisibility(true) , but the thing is that it doesn't reflects the
new changes in table to map as layer is created previously  and the changes
are made on map only if I move up the panzoombar and then come down. I tried
making this layer in showmap() instead of init() but didn't work. Also
wms[8].reload() doesn't work ....Is there any way out I can reload init()
and then display the layer in showmap() so that on calling showmap() ..map
is reloaded and wms[8] is made visible.

Cheers,
Reena
-- 
View this message in context: http://www.nabble.com/Reload-map-from-external-function-and-make-a-layer-visible-tp20148389p20148389.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list