[OpenLayers-Users] GeoRSS projection confusion:

Christopher Schmidt crschmidt at metacarta.com
Mon Aug 31 10:31:29 EDT 2009


On Mon, Aug 31, 2009 at 03:41:42PM +0200, DeDuikertjes wrote:
> Dear List,
> 
> I have a georss file (with should be by definition in EPSG:4326) with 
> one point:
> <gml:pos>6.36844646999779 51.8855430932258</gml:pos> it gets reprojected 
> without me asking for it.
> 
> When I show that as simple as possible in openlayers with:
> (working example on: 
> http://80.101.100.35/planhosting/testplannen/openlayers/showmap3c.html)
> var map = null;
>         var rsslayerURL;
>        
>         function init(){
>            
>          map = new OpenLayers.Map('map', {
>             allOverlays: true,
>             controls: []
>             });   
>            
>         rsslayerURL = "wkt/NL.IMRO.0999.BP2008000001-0005-2b.rss";
>         rssLayer = new 
> OpenLayers.Layer.GeoRSS("Informatielaag",rsslayerURL, {
>            
>         });
>                
>         map.addLayers([rssLayer]);
>         map.zoomToMaxExtent();
>        
>         map.addControl(new OpenLayers.Control.PanZoomBar());
>         map.addControl(new OpenLayers.Control.LayerSwitcher());
>         map.addControl(new OpenLayers.Control.MousePosition());
>        
> The point gets (according to the mouseposition) reprojected to about 
> 52.38 11.25. Why is that? I've never asked for that.

The Mouse position indicates the 'bottom' point of the marker is at the
correct location. The problem is that you are assuming the 'dot' in the
center of the OpenLayers Marker is the 'central' point for the marker --
it is not. (If you zoomed your map in, you wold see that the tail of the 
marker would remain on the point of interest, and the position of the
marker 'dot' shifts significantly.)

The marker is 'above' the point of the data, not centered on  it. (Also,
the central black dot in the marker isn't 'centered', anyway.)

-- Chris

> If I specify EPSG:4326 as layerprojection, mapprojection and 
> displayprojection the same happens.
> (working example: 
> http://80.101.100.35/planhosting/testplannen/openlayers/showmap3b.html).
> 
> If I try to reproject it together with other data (Working example: 
> http://80.101.100.35/planhosting/testplannen/openlayers/showmap3.html),
> the other data gets reprojected as should, but not the georss layer.
> 
> What is happening ?
> Please help, I'd like to have the georss layer lined up with my data in 
> epsg 28992.
> 
> MArco
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users

-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list