[Qgis-developer] Re: Openlayers plugin and Virtual Earth
(i.e.Bing Maps)
Pirmin Kalberer
pi_ml at sourcepole.com
Fri Dec 3 01:59:52 EST 2010
Hi Noli,
Am Freitag, 3. Dezember 2010, um 06.25:15 schrieb Noli Sicad:
> Hi,
>
> This is the screenshot (below) of offset - bing maps and trace
> shapefile from google map.
>
> https://352508258456434760-a-1802744773732722657-s-sites.googlegroups.com/s
> ite/qgisbingoffset/home/Screenshot.png?attachauth=ANoY7crKuHih7GmYN5reQr6Y2
> adfkYVgqdvhDvNfmzRyoIw0gph5YcpzEz5n8EtxTzrY_XSqDgfkmwUmV3Sb2qeW7Nq9XZ9VK7_a
> EglDxGUUSb4AHyLf0NjDPVdShf2JWF-VAF3W-kz-X5DQmLiqI8R-MidJwjxAFItZYuf4t3-kNiY
> 2_nW4gdkaHkF2nvH8dcsmw3EIWKt1fO8SdSPQyoZKrwazx7oAdg%3D%3D&attredirects=0
>
> Any ideas how can this offset be correct in Openlayers plugin?
>
> It seems that JOSM manage to correct this offset.
>
> http://lists.openstreetmap.org/pipermail/talk/2010-December/055151.html
I would try to omit the displayProjection in OpenLayers (as in
http://openlayers.org/dev/examples/bing.html) and change the QGIS reprojection
to EPSG:54004 or whatever Bing's projection is.
Regards
Pirmin
>
> On 12/3/10, Noli Sicad <nsicad at gmail.com> wrote:
> > Hi,
> >
> > I am trying to add Virtual Earth (Bing Maps) to QGIS Openlayers plugin
> > and I have trouble on the projection of Bing Maps (i.e. alignment). My
> > shapefile layer (i.e.traces from the Google Maps) and other shapefile
> > layers are off when I overlayed the Bing map (Bing Hybrid).
> >
> > Bing is far better Satellite imagery compare to Yahoo and Google. OSM
> > is using Bing for traces lately as result of Steve Coast (OSM founder)
> > working with Bing.
> >
> > http://wiki.openstreetmap.org/wiki/File:Selecting_Bing_in_JOSM.png
> >
> > I know that Bing uses different projection,
> > http://www.cadmaps.com/gisblog/?p=80
> >
> >
> > displayProjection: new OpenLayers.Projection("EPSG:4326"),
> >
> > Inserting this code above does not help at all.
> >
> > Here the entire code.
> >
> > <html xmlns="http://www.w3.org/1999/xhtml">
> >
> > <head>
> >
> > <title>OpenLayers Google Hybrid Layer</title>
> > <style type="text/css">
> >
> > body {
> >
> > margin: 0;
> >
> > }
> > #map {
> >
> > width: 100%;
> > height: 100%;
> >
> > }
> > .olLayerGoogleCopyright {
> >
> > left: 2px;
> > bottom: 2px;
> >
> > }
> > .olLayerGooglePoweredBy {
> >
> > left: 2px;
> > bottom: 15px;
> >
> > }
> > .olControlAttribution {
> >
> > font-size: smaller;
> > right: 3px;
> > bottom: 4.5em;
> > position: absolute;
> > display: block;
> >
> > }
> >
> > </style>
> > <!-- this gmaps key generated for http://openlayers.org/dev/ -->
> > <script
> >
> > src='http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAjpkAC9e
> > PGem0lIq5XcMiuhR_wWLPFku8Ix9i2SXYRVK3e45q1BQUd_beF8dtzKET_EteAjPdGDwqpQ'>
> > </script>
> >
> > <script src="OpenLayers.js"></script>
> > <script type="text/javascript">
> >
> > var map;
> >
> > function init() {
> >
> > map = new OpenLayers.Map('map', {
> >
> > theme: null,
> > controls: [],
> > projection: new OpenLayers.Projection("EPSG:900913"),
> >
> > displayProjection: new OpenLayers.Projection("EPSG:4326"),
> >
> > units: "m",
> > maxResolution: 156543.0339,
> > maxExtent: new OpenLayers.Bounds(-20037508.34,
> >
> > -20037508.34, 20037508.34, 20037508.34)
> >
> > });
> >
> > var gmap = new OpenLayers.Layer.Google(
> >
> > "Google Hybrid",
> > {type: G_HYBRID_MAP, numZoomLevels: 19,
> >
> > 'sphericalMercator': true}
> >
> > );
> > map.addLayer(gmap);
> > map.setCenter(new OpenLayers.LonLat(0, 0), 2);
> >
> > }
> >
> > </script>
> >
> > </head>
> > <body onload="init()">
> >
> > <div id="map"></div>
> >
> > </body>
> >
> > </html>
> >
> > Any ideas how to solve this problem of non alignment of the layers using
> > Bing.
> >
> > Thanks.
> >
> > Regards, Noli
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
--
Pirmin Kalberer
Sourcepole - Linux & Open Source Solutions
http://www.sourcepole.com
More information about the Qgis-developer
mailing list