Hi,
my application use "layers" and "markers".
Now I open a new browser windows with a WMS like this:
window.open('http://localhost:8080/geoserver/wms?bbox=263422.831249467,
3869554.162498004,1362062.5437611928,5284838.087541916&styles=&minScale=58835000000&
Format=application/openlayers&request=GetMap&layers='+map.layers[0].name +
'&width=2977&height=2050&srs=EPSG:4326','mappa','width=500,height=500
,toolbar=yes, location=no,
status=yes,menubar=yes,scrollbars=yes,resizable=yes');
and this works fine! with:
1. layers='+map.layers[0].name
2. styles=&minScale=58835000000
Now, I need to "extend" this wms with "MARKERS" info.
In my javascript I've defined an "array" of markers like this:
function addMarker2(objRef, id){ // alert("addMarker2");
alert("objRef.value="+objRef.value);
var testo="";
var tipovalore="";
var tipovalore2="";
var numdati=103;
var_objRef=objRef;
var_id=id;
if(livello_scelta=="REGIONE")numdati=20;
else if (livello_scelta=="AREA") numdati=4;
else numdati=103;
popup=new Array();
arr_query= new Array();
arr_query[0]= new Array();
for(w=1; w<=103; w++){ //Numero province 103 lo imposto a 103 e
lo ricompatto in seguito
arr_query[w]= new Array();
for(h=0;h<20;h++){
arr_query[w][h]= null;
}
popup[w]= new OpenLayers.Popup("chicken",
new OpenLayers.LonLat(9.07,39.13),
new OpenLayers.Size(200,80),//100
"Provincia: <br>CODICE ISTAT:",
true);
}
if (!objRef.checked){ //Se รจ un unchecked (l'ho
dececcato)
var cancella=null;
var arr_temp = new Array();
var arr_temp2 = new Array();
var arr_temp3 = new Array();
for(y=0; y< marker_layers.length ; y++){
if(marker_layers[y]!=objRef.value) {
arr_temp.push(markers_arr[y]);
arr_temp2.push(marker_layers[y]);
arr_temp3.push(popup_arr[y]);
}else{
cancella=y;
}
}
map.removeLayer(markers_arr[cancella]);
markers_arr=arr_temp;
marker_layers=arr_temp2;
popup_arr=arr_temp3;
}else{
marker_layers.push(objRef.value);
Now, the question is... Can I invoke the WMS with layer and marker
toghether?
Thanks in advance,
Jack
I need to open a new windows with "italy" <-- layer
AND the markers (yellow circles), together!
http://www.nabble.com/file/p15353924/layer%2Bmarkers.jpg
--
View this message in context: http://www.nabble.com/WMS--layers-and-markers-tp15353924p15353924.html
Sent from the GeoServer - User mailing list archive at Nabble.com.