[OpenLayers-Users] vecto reprojection
Vladimir Stupar
stuparvladimir at gmail.com
Sat Dec 17 18:21:23 EST 2011
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")));
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20111218/30b9ac97/attachment.html
More information about the Users
mailing list