Sunday, 26 July 2015

Query Feature using OpenLayers + MapServer


I'm trying to query a feature in OpenLayers, but it's returning just an image highlighted that is not possible to make zoom, pan and drag.


My intention is to query a feature on the map like street name, city and country. Is there any function in OpenLayers?


I'm using this code:


var query = new OpenLayers.Layer.WMS( "Utbs", 
"http://localhost/cgi-bin/wms.exe",

{
srs: 'EPSG:4326',
width: '800',
styles: '',
height: '600',
layers: 'layer_name',
mode: 'itemquerymap',
qstring: "(value = '03')",
qlayer: 'layer_name',
mapxy: 'shape'

},
{
singleTile: true
}
);

map.addLayers([utbs_query]);
map.zoomToMaxExtent();


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...