[OpenLayers-Users] getting Feature Info data directly from .shp
files
bwoodall
bwoodall at bwoodall.org
Mon Mar 22 16:03:24 EDT 2010
Howdy,
I think you might find the following example able to answer most of your
questions.
http://openlayers.org/dev/examples/getfeatureinfo-popup.html
as for other questions, there is nothing like looking ino the code which
in this case is lib/OpenLayers/Control/WMSGetFeatureInfo.js
you will find;
/**
* Property: layers
* {Array(<OpenLayers.Layer.WMS>)} The layers to query for feature info.
* If omitted, all map WMS layers with a url that matches this <url> or
* <layerUrl> will be considered.
*/
layers: null,
On Mon, 2010-03-22 at 01:53 -0800, sunny74 wrote:
> Hi,
>
> I had already seen it.
> But it does not work bec' of 2 reasons:
>
> 1) The Required Query_Layers parameter for GetFeatureInfo is not
> mentioned.This has to be done in the map file.
>
> 2) The code for infocontrol is:
>
> infoControls = {
> click: new OpenLayers.Control.WMSGetFeatureInfo({
> url: 'http://demo.opengeo.org/geoserver/wms',
> title: 'Identify features by clicking',
> layers: [water],
> queryVisible: true
> }),
> hover: new OpenLayers.Control.WMSGetFeatureInfo({
> url: 'http://demo.opengeo.org/geoserver/wms',
> title: 'Identify features by clicking',
> layers: [water],
> hover: true,
> // defining a custom format options here
> formatOptions: {
> typeName: 'water_bodies',
> featureNS: 'http://www.openplans.org/topp'
> },
> queryVisible: true
> })
> }
>
> The url of WMSGetFeatureInfo is an external url i.e accessing some external
> data.
> What if I'm using mapserver and its pointing to shape(.shp) files.
More information about the Users
mailing list