[OpenLayers-Users] Tilecache and 3rd party layers

Bill Woodall bwoodall at wardrobe.dhs.org
Fri Feb 9 18:28:12 EST 2007


Hi Jennifer,

I like your "Natural Earth", very nice!

It appears that this is an existing bug (#480) which I'm currently
working on
and hopefully done with it shortly.  I'll add your page to my list of
tests to verify
the fix.

.........Bill,


On Fri, 2007-02-09 at 13:32 -0800, Jennifer Strahan wrote:

> Hello List,
> 
> Is it possible to set up an OpenLayers map that allows users to 
> toggle between a Tilecache basemap and a third party basemap such as 
> the Google Hybrid layer?  I've set up a test and when I switch 
> between the two layers the map scale changes dramatically.  Any 
> suggestions or work-arounds would be appreciated.  The code I'm 
> playing with is below.
> 
> Thanks,
> Jennifer
> 
> <html xmlns="http://www.w3.org/1999/xhtml">
>    <head>
>      <style type="text/css">
>          #map {
>              width: 700px;
>              height: 700px;
>              border: 1px solid black;
>              background-color: white;
>          }
>      </style>
>          <!-- this gmaps key generated for http://openlayers.org/dev/ -->
>              <script 
> src='http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAw874S7GDJrTKF-hByeq-RBTw3BVAxQz7_zJnwc-4a2w6zwgAIBSWyVuG8kPDqlCqZwwfIc2TyWWSSA'></script>
>              <!-- Localhost key -->
>              <!-- <script 
> src='http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAw874S7GDJrTKF-hByeq-RBTw3BVAxQz7_zJnwc-4a2w6zwgAIBSWyVuG8kPDqlCqZwwfIc2TyWWSSA'></script>-->
>      <script 
> src="http://dev.openlayers.org/sandbox/tschaub/gutter/lib/OpenLayers.js"></script>
> 
> 
>      <script type="text/javascript">
>          <!--
>          var map, layer;
> 
>          function init(){
> 
>              var options = { maxExtent: new 
> OpenLayers.Bounds(-125.77,13.05,-66.31,60.81),
>                                          'maxResolution': .1161328125,
>                                      controls: [new 
> OpenLayers.Control.MouseDefaults()]
>                  };
> 
>              map = new OpenLayers.Map( $('map'), options );
> 
>              var natearth = new OpenLayers.Layer.WMS( "Natural Earth",
>                                                            "http://82.165.243.230/cgi-bin/tilecache-1.3/tilecache.cgi?",
>                                                            {layers: 
> 'natearth', format:'image/jpeg'});
>              map.addLayer(natearth);
> 
>              var g_hybrid = new OpenLayers.Layer.Google( "Google 
> Hybrid" , {type: G_HYBRID_MAP});
>              map.addLayer(g_hybrid);
> 
> 
>              map.setCenter(new OpenLayers.LonLat(-119.38, 37.45), 4);
>              map.addControl( new OpenLayers.Control.LayerSwitcher() );
>              map.addControl( new OpenLayers.Control.PanZoomBar() );
>            map.addControl(new OpenLayers.Control.Scale());
> 
>          }
> 
> 
> 
>      // -->
> 
>      </script>
>    </head>
>    <body onload="init()">
> 
> 
>      <div id="map"></div>
> 
>    </body>
> </html>
> 
> 
> 
> 
> 
> Jennifer Strahan
> GreenInfo Network - 1996-2006: A Decade of Mapping the Public Interest
> 116 New Montgomery  Street   Suite 738  San Francisco CA  94105
> PH: (415)979-0343 x306    Fax:  415-979-0371     Web:  www.greeninfo.org
> 
> 
> 
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20070209/3f40b0b2/attachment.html


More information about the Users mailing list