[OpenLayers-Users] Projections

Christopher Schmidt crschmidt at metacarta.com
Mon May 11 18:31:21 EDT 2009


On Mon, May 11, 2009 at 03:13:19PM -0700, Gregor at HostGIS wrote:
> > How can I get OpenLayers to use the native projection that my data's in?
> 
> Set the map's projection when it's created:
> 
> myproj = new OpenLayers.Projection('EPSG:12345');
> map = new OpenLayersMap('map', {projection:myproj})

Which does almost nothing. The key aspect of reprojecting is the setting
of two parameters in addition to this one:
  * maxExtent - OpenLayesr.Bounds object, left, bottom, right, top of
    extent of data
  * maxResolution - number of map units per pixel at most zoomed out.
    "auto" works as a wawy to set this if you don't know what it should
    be set to.


  http://faq.openlayers.org/map/how-do-i-set-a-different-projection-on-my-map/

> 
> http://dev.openlayers.org/apidocs/files/OpenLayers/Map-js.html#OpenLayers.Map.projection
> 
> -- 
> HostGIS, Open Source solutions for the global GIS community
> Greg Allensworth - SysAdmin, Programmer, GIS Person, Security
> Network+   Server+   A+   Security+
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users

-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list