[mapserver-users] Openlayers + Bing Maps with Mapserver WMS projection error...

Paul james pauljame at gmail.com
Wed Aug 11 13:06:03 EDT 2010


Thanks for the help...
I tried use spherical marcator like that:

 var bing= new OpenLayers.Layer.VirtualEarth("Shaded", {
       type: VEMapStyle.Shaded, numZoomLevels: 10,sphericalMercator: true
  });

And use that projection in mapfile and openlayers:
PROJECTION
        "+init=epsg:3857"

Openlayers
 map = new OpenLayers.Map('Test', {
         resolutions: [0.09524345064126273, 0.0730199788249681,
0.047621725320631365, 0.031747816880420915, 0.015873908440210457,
0.009524345064126272, 0.0031747816880420914, 0.0015873908440210457,
0.0007936954220105228, 0.00031747816880420915],
        projection: "EPSG:4326",
        maxExtent: new OpenLayers.Bounds(-102.2607421875, -46.142578125,
4.7021484375, 13.623046875)
    });


But using that, my wms layers "disappear"... To other projection maybe?

Any idea?

Thanks


On Wed, Aug 11, 2010 at 12:35 PM, Edward Mac Gillavry <
emacgillavry at hotmail.com> wrote:

>  Bing maps is also using EPSG: 900913, EPSG:3785 or EPSG:3857 whichever is
> the latest... That should do the trick.
>
> HTH
>
> Edward
>
>
>
> ------------------------------
> Date: Wed, 11 Aug 2010 11:12:47 -0300
> From: pauljame at gmail.com
> To: mapserver-users at lists.osgeo.org
> Subject: [mapserver-users] Openlayers + Bing Maps with Mapserver WMS
> projection error...
>
>
> Hey guys...
> When using Bing maps as base layer, I have huge difference between my data
> ... Both are using WGS84 projection...
> The image is attached...
>
> Any idea?
>
> Thanks
>
> My WMS map:
> MAP
> ...
>   PROJECTION
>         "+init=epsg:4326"
>   END
>
>  WEB
>         IMAGEPATH 'D:\Temp'
>         IMAGEURL '/tmp/'
>         QUERYFORMAT 'text/html'
>
>         METADATA
>             "wms_title"     "WMS Server"  ##required
>             "wms_onlineresource" "http://localhost/cgi-bin/mapserv.exe?"
> ##required
>             "wms_srs"       "EPSG:4269 EPSG:4326 EPSG:42304 EPSG:42101
> EPSG:900913"  ##recommended
>             "wms_feature_info_mime_type" "text/html"
>             "labelcache_map_edge_buffer"
>   "-10"
>         END
>     END
> ...
>
> LAYER
>         NAME STATE
>         METADATA
>             "wms_title"    "STATE"   ##required
>             "wms_feature_info_mime_type" "text/html"
>         END
>
>         TYPE polygon
>         STATUS ON
>         INCLUDE "Connection.map"
>         DATA "..."
>         PROCESSING "CLOSE_CONNECTION=DEFER"
>         PROCESSING "LABEL_NO_CLIP=ON"
>
>         PROJECTION
>             "init=epsg:4326"
>         END
> ...
>
>
> My Openlayers config:
>
>  map = new OpenLayers.Map('Test', {
>          resolutions: [0.09524345064126273, 0.0730199788249681,
> 0.047621725320631365, 0.031747816880420915, 0.015873908440210457,
> 0.009524345064126272, 0.0031747816880420914, 0.0015873908440210457,
> 0.0007936954220105228, 0.00031747816880420915],
>         projection: "EPSG:4326",
>         displayProjection: new OpenLayers.Projection("EPSG:4326"),
>         tileSize: new OpenLayers.Size(400, 400),
>         maxExtent: new OpenLayers.Bounds(-102.2607421875, -46.142578125,
> 4.7021484375, 13.623046875)
>     });
>
> _______________________________________________ mapserver-users mailing
> list mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20100811/a7b77a53/attachment.html


More information about the mapserver-users mailing list