[OpenLayers-Users] vecto reprojection

Vladimir Stupar stuparvladimir at gmail.com
Sat Dec 17 21:16:08 EST 2011


Yes, I included proj4js. Actually, when I am not using reference to
epsg:3908 my data is displayed just 200 meters to the east from where they
should have.


On Sun, Dec 18, 2011 at 2:43 AM, Zac Spitzer <zac.spitzer at gmail.com> wrote:

> 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
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>



-- 
Vladimir Stupar
Katedra za Ekologiju šuma
Šumarski fakultet, Univerzitet u Banjaluci
S. Stepanovića 75a, 78000 Banjaluka
Bosna i Hercegovina
tel.:+38765692006
fax.:+38751460550
e-mail: stuparvladimir at gmail.com
skype: vmstupar

Vladimir Stupar
Department for Forest ecology
Forestry faculty, University in Banjaluka
S. Stepanovica 75a, 78000 Banjaluka
Bosnia & Hercegovina
tel.:+38765692006
fax.:+38751460550
e-mail: stuparvladimir at gmail.com
skype: vmstupar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20111218/3bb459fe/attachment.html


More information about the Users mailing list