I: [MapQuery] how to add an existing ol layer to mapquery

Giuseppe De Marco peppelinux at yahoo.it
Tue May 15 16:16:03 EDT 2012



Thank you Volker,

I was hang in on my foolish brain loop, as world teaches to us the answer is always much simple respect what we thought...


I simply add in jquery.mapquery.core.js, at line 892:
       
 existing_ol: function(options) {
            //alert(67);
            o = $.extend(true, {}, $.fn.mapQuery.defaults.layer.all,
                    $.fn.mapQuery.defaults.layer.raster,
                    options);
            params = {
                //layers: o.layers,
                layers: options.ol_layer,
                transparent: o.transparent,
                format: o.format
            };
            if(typeof o.wms_parameters != "undefined"){
                params = $.extend(params, o.wms_parameters);
            }
            //alert('ytu');
            return {
                //layer: options.ol_layer,
                layer: new OpenLayers.Layer.WMS(o.label, o.url, params, o),
                options: o,
            };
        },   

and then I added to the created ol_layers two parameters, 'visibility': true and 'opacity': 1, as the example above:

  pcn_orto_06_sm_tlch = new OpenLayers.Layer.WMS("Tilecache Difsuolo", "http://localhost/cgi-bin/tilecache.cgi", {'layers': "pcn_minambiente_ortofoto_2006_900913", 'visibility': true, 'opacity': 1,}, {'projection': proj});

That's all,
it works all the way.
Thank you all, mapquery is a very smart idea
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapquery/attachments/20120515/99999f39/attachment.html


More information about the MapQuery mailing list