[OpenLayers-Users] Mapserver labels, Google and WMS in one map
Marcos Cobeña
marcoscobena at gmail.com
Tue Aug 29 12:35:37 CDT 2006
Hello Arnd,
Having two different WMS layers toguether (at the same view) is useful
as it allows, for example, to take part of cities names (using
Google's one) and very high detail definition (now with NASA's one).
Yes, it's currently possible to do as Erik has previously told you:
"
ex:
var wms = new OpenLayers.Layer.WMS("OpenLayers WMS",
"http://dgtad.dti.digitro.com.br:8080/mapserver_wms/wms", {layers:
'rio_grande_do_sul,limite_municipal, transparent: true'} );
-- OR --
var wms = new OpenLayers.Layer.WMS("OpenLayers WMS",
"http://dgtad.dti.digitro.com.br:8080/mapserver_wms/wms", {layers:
'rio_grande_do_sul,limite_municipal'} ); wms.isBaseLayer = false;
"
Hope this helps.
Regards,
2006/8/29, Arnd Wippermann <arnd.wippermann at web.de>:
> Hello,
>
> What is the use of having google and wms in the same map? With Openlayers it
> is yet not possible to get the two matching each other. That's what I have
> understand from previous posts.
>
> Mit freundlichen Grüssen
>
> Arnd Wippermann
> http://gis.ibbeck.de/pinguinale/
>
>
>
>
>
> -----Ursprüngliche Nachricht-----
> Von: users-bounces at openlayers.org [mailto:users-bounces at openlayers.org] Im
> Auftrag von Erik Uzureau
> Gesendet: Dienstag, 29. August 2006 01:33
> An: José Vilson de Mello de Farias
> Cc: users at openlayers.org
> Betreff: Re: [OpenLayers-Users] Mapserver labels
>
> On 8/28/06, José Vilson de Mello de Farias <vilson.farias at digitro.com.br>
> wrote:
> >
> > Greetings,
> >
> > How does OpenLayers/Mapserver/WMS deals with labels? I made some
> > tests today and I realized that image tiles can bring undesired
> > effects to Mapserver labels. As a result, each tile has it's own
> > labels. The resulting map is crowded of useless and croped pieces of
> labels.
> >
> > Is there a workaround for this situation? I read something about
> > Ka-Map being an alternative for Mapserver deficiences related with
> > tiling. Is this a situation that ka-map solves?
> >
> > I have other question, this time a Google Map question. Is it
> > possible to have to layers, one Mapserver WMS and other Google Maps in
> > the same map? I wrote a test code and it seems I can only have one of
> > these. The code is bellow :
>
> Ola José. Yes it is possible to have WMS and Google layers in the same map.
>
> The code of yours that you have placed below I assume does actually add both
> layers to the map, but both as base layers. if you want your wms data to
> appear as an overlay, you have to either add a transparent: true parameter
> or directly set the isBaseLayer property to false.
>
> ex:
>
> var wms = new OpenLayers.Layer.WMS("OpenLayers WMS",
> "http://dgtad.dti.digitro.com.br:8080/mapserver_wms/wms", {layers:
> 'rio_grande_do_sul,limite_municipal, transparent: true'} );
>
> -- OR --
>
> var wms = new OpenLayers.Layer.WMS("OpenLayers WMS",
> "http://dgtad.dti.digitro.com.br:8080/mapserver_wms/wms", {layers:
> 'rio_grande_do_sul,limite_municipal'} ); wms.isBaseLayer = false;
>
> For more information on baselayers and overlays, see the following wiki:
> http://trac.openlayers.org/wiki/BaseLayersAndOverlays
>
> Best,
> Erik
>
>
>
>
>
>
> >
> > <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> > <html> <head>
> > <script
> > src="http://openlayers.org/api/2/OpenLayers.js"></script>
> > <script
> >
> src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAa3W6Wyz6M2
> grTpO8gp_f-xQyfmQrqwatIbt26NwwjFlL5q1_BRTeFkmJfyZiYU5zHNCsECyPQIFv-A"
> > type="text/javascript"></script>
> > <script type="text/javascript"></script>
> > <title>Teste OpenLayers</title>
> > </head>
> > <body>
> > <div style="width: 100%; height: 100%;" id="map"></div>
> > <script defer="defer" type="text/javascript">
> > var map = new OpenLayers.Map('map');
> > var gmapLayer = new OpenLayers.Layer.Google("map");
> > var wms = new OpenLayers.Layer.WMS("OpenLayers WMS",
> > "http://dgtad.dti.digitro.com.br:8080/mapserver_wms/wms",
> > {layers: 'rio_grande_do_sul,limite_municipal'} );
> > map.addLayer(wms);
> > map.addLayer(gmapLayer);
> > map.zoomToMaxExtent();
> > </script>
> > </body>
> > </html>
> >
> >
> > That's it, best regards and thanks in advance.
> >
> >
> >
> > --
> > José Vilson de Mello de Farias
> > Analista de Sistemas
> > SSE - Segurança Pública
> >
> > DÍGITRO TECNOLOGIA
> > E-mail: vilson.farias at digitro.com.br
> > Messenger: vilsonfarias at hotmail.com
> > Fone: (0xx48) 3281-7314
> > Fax: (0xx48) 3281-7000
> > Site: www.digitro.com.br
> > _______________________________________________
> > Users mailing list
> > Users at openlayers.org
> > http://mailman-viper.python-hosting.com/listinfo/users
> >
> >
> >
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://mailman-viper.python-hosting.com/listinfo/users
>
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://mailman-viper.python-hosting.com/listinfo/users
>
--
Marcos - http://www.youcannoteatbits.org
More information about the Users
mailing list