[OpenLayers-Users] vecto reprojection

Zac Spitzer zac.spitzer at gmail.com
Sat Dec 17 20:43:02 EST 2011


have you included proj4js ?

On Sun, Dec 18, 2011 at 10:21 AM, Vladimir Stupar
<stuparvladimir at gmail.com> wrote:
> Hi everyone!
>
> I am building a GIS app in geoDjango with OpenLayers and using data from
> PostGIS in projection EPSG:3908. The base layer is OSM. When I add vector
> data I got it rendered near Brazil instead of Bosnia. I tried everything but
> just can't get the solution.
>
> Please can anyone help?
>
> Here is the code:
>
> var map, osm, kml;
>
> function init(){
>
>         map = new OpenLayers.Map('map');
>
>
>         map.addControl(new OpenLayers.Control.LayerSwitcher());
>
>
>         var osm = new OpenLayers.Layer.OSM(
>
>             "OSM");
>
>         kml = new OpenLayers.Layer.GML("KML", upit,
>
>            {format: OpenLayers.Format.KML,
>
>             projection: new OpenLayers.Projection("EPSG:3908")});
>
>
>         map.addLayers([osm, kml]);
>
>
>         map.zoomToExtent(
>            new OpenLayers.Bounds(15.774414, 42.6, 19.662109,
> 45.2).transform(new OpenLayers.Projection("EPSG:4326"),new
> OpenLayers.Projection("EPSG:900913")));
>
>
>
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>



-- 
Zac Spitzer
Solution Architect / Director
Ennoble Consultancy Australia
http://www.ennoble.com.au
http://zacster.blogspot.com
+61 405 847 168


More information about the Users mailing list