[OpenLayers-Users] Run-Time Subsititution to OGR Layer

tpascoe Tim.Pascoe at EC.GC.CA
Wed Mar 14 11:04:18 EDT 2012


I'm new to OpenLayers, and I've been experimenting with the possibility of
modifying an OGR Layer's SQL statement, by passing a run-time variable
through to the MAP file. I read a few posts here which seemed to indicate
that this could be accomplished by simply adding a variable to
openlayers.Layer.WMS, which I've done:

new OpenLayers.Layer.WMS('CABIN', 'http://*****ca/cabin_ows.asp', { layers:
'CABIN', transparent: 'true', format: 'image/png', 'projection':
'EPSG:4326', *txtYear: '2011' *}, { 'isBaseLayer': false, singleTile:
'true', transitionEffect: 'resize', buffer: 0, ratio: 1.2 });

However, the variable does not seem to be read properly when the map file is
processed. Is this simply an issue of properly escaping the variable (which
I have also tried) in the OGR ScrSQL tag, or am I completely on the wrong
track?

I'd appreciate any suggestions or solutions.

Thanks,

Tim

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Run-Time-Subsititution-to-OGR-Layer-tp4578512p4578512.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list