[OpenLayers-Users] getFeatureInfo request in new window + new map?

Tim Schaub tschaub at openplans.org
Sat Jan 26 01:33:14 EST 2008


Hey-

Also take a look at SLD.  You can have a WMS style just a single feature 
by including a filter in SLD.  There are some docs on the MapServer site 
for this as well.

Tim

Eric Lemoine wrote:
> With MapServer passing mapfile variable values as GET params can be
> done, even with WMS I've been told. Check the MS doc.
> 
> 2008/1/23, Maria Panagou <snowdrop at ath.forthnet.gr>:
>>
>> is it possible to use variable substitution in a layer creator url,in a
>> header template file (getfeatureinfo) such as:
>>
>>  var quakes = new OpenLayers.Layer.WMS( "Óçìáíôéêïß Óåéóìïß",
>>                        "http://127.0.0.1/cgi-bin/mapserv.exe?",
>>                         {map: '../htdocs/mpanagou/Quakes1local.map',
>>                           layers: 'Quakes',ID=[codee]
>> 						  transparent: true},
>>                           {isBaseLayer:false, singletile:true, reproject:
>> true});
>>
>> where ID is filter condition, [codee] attribute from getfeatureinfo.
>>
>> in map file, layer quakes is defined by:
>>
>> DATA "pos FROM (select * from public.quake_small where codee1=%ID%) as foo
>> using unique codee1 using SRID=4326"
>>
>>
>> in OL, the declaration of quakes as following works:
>>
>> var quakes = new OpenLayers.Layer.WMS( "Óçìáíôéêïß Óåéóìïß",
>>                        "http://127.0.0.1/cgi-bin/mapserv.exe?",
>>                         {map: '../htdocs/mpanagou/Quakes1local.map',
>>                           layers: 'Quakes',ID=721
>> 						  transparent: true},
>>                           {isBaseLayer:false, singletile:true, reproject:
>> true});
>>
>> but i want id to be set dynamically as the value of codee attribute returned
>> by getfeatureinforequest
>>
>> thank you
>> --
>> View this message in context:
>> http://www.nabble.com/getFeatureInfo-request-in-new-window-%2B-new-map--tp15009098p15032612.html
>> Sent from the OpenLayers Users mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> Users mailing list
>> Users at openlayers.org
>> http://openlayers.org/mailman/listinfo/users
>>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
> 
> !DSPAM:4033,4796edef251901849620573!
> 




More information about the Users mailing list