[OpenLayers-Users] layerswitcher minimize option

Gery . gamejihou at hotmail.com
Wed Jun 6 02:52:02 PDT 2012



Hello Neelima,

Thanks for the file!, now I understand, uhmmm I compare both style.css (sdiff -s file1 file2) files but they are the same, also the Openlayers.js in both html, so not sure what is the solution, perhaps it is something to do with this code:

<script type="text/javascript">
        var map;
        function init(){
            map = new OpenLayers.Map('map', { controls: [] });
            map.addControl(new OpenLayers.Control.Navigation());

            map.addControl(new OpenLayers.Control.LayerSwitcher({'div':OpenLayers.Util.getElement('layerswitcher')}));

            var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
                "http://vmap0.tiles.osgeo.org/wms/vmap0",
                {layers: 'basic'}, {'displayInLayerSwitcher':false} );

            var jpl_wms = new OpenLayers.Layer.WMS( "NASA Global Mosaic",
                "http://t1.hypercube.telascience.org/cgi-bin/landsat7", 
                {layers: "landsat7"}, {'isBaseLayer': false});

            var dm_wms = new OpenLayers.Layer.WMS( "DM Solutions Demo",
                "http://www2.dmsolutions.ca/cgi-bin/mswms_gmap",
                {layers: "bathymetry,land_fn,park,drain_fn,drainage," +
                         "prov_bound,fedlimit,rail,road,popplace",
                 transparent: "true", format: "image/png" });

            jpl_wms.setVisibility(false);
            dm_wms.setVisibility(false);

            map.addLayers([ol_wms, jpl_wms, dm_wms]);
            if (!map.getCenter()) map.zoomToMaxExtent();
        }
    </script>

By the way, I have been the way to include code to measure as the layerswitcher, but without success so far, perhaps around there is the solution.

Hope this helps,

Gery

From: neelima.emmani at iictechnologies.com
To: gamejihou at hotmail.com
CC: openlayers-users at lists.osgeo.org
Subject: RE: [OpenLayers-Users] layerswitcher minimize option
Date: Wed, 6 Jun 2012 09:40:06 +0000







Hi Gery,


Please find the attached file , which describes my problem. The one i am trying to do is second image but with minimize and maximize options on layer switcher.



With Regards,

Neelima Emmani







From: Gery . [gamejihou at hotmail.com]

Sent: Wednesday, June 06, 2012 1:12 PM

To: Neelima Emmani; openlayers-users at lists.osgeo.org

Subject: RE: [OpenLayers-Users] layerswitcher minimize option








Hello Neelima,



Sorry but I didnt understand what you are trying to do, could you show 2 figures about that? perhaps one with what you have and the other about what you want. Nevertheless, check these links, perhaps this solves your problem: http://openlayers.org/dev/examples/fullScreen.html,
 http://openlayers.org/dev/examples/layerswitcher.html



HTH,






From: neelima.emmani at iictechnologies.com

To: openlayers-users at lists.osgeo.org

Date: Wed, 6 Jun 2012 04:49:28 +0000

Subject: [OpenLayers-Users] layerswitcher minimize option




Hi All,

I have layer switcher working very well inside the map. But , i want the layer switcher to be adjacent to the map. Which is also displayed well. Here comes my problem, I can all the map layers in the switcher but cannot minimize the layer switcher. Can any
 one tell me why? and where to solve it. 



I found following piece of code in layerswitcher.js file 



 // set mode to minimize

       if(!this.outsideViewport) {

            this.minimizeControl();

        }

And tried as below 

// set mode to minimize

       if(this.outsideViewport) {

            this.minimizeControl();

        }

Even then one didnot find any difference . Can you please help me in getting the right way to solve this.

 

With Regards,

Neelima Emmani








_______________________________________________ Users mailing list Users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/openlayers-users



 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20120606/95e5e412/attachment.html>


More information about the Users mailing list