how to transform the projection.

المشرف العام

Administrator
طاقم الإدارة
I Want to transform the coordinate system in this script. to get a right projection for geolocation. I want epsg 4326 for geolocation coordinate system

var view = new ol.View({ center:eek:l.proj.transform([110.365,-7.795],'EPSG:4326','EPSG:900913'), zoom:12.2 }); var map = new ol.Map({ target:'map', renderer:'canvas', view: view }); var newLayer = new ol.layer.Tile({ source : new ol.source.OSM() }); map.addLayer(newLayer); var geolocation = new ol.Geolocation({ tracking : true projection: view.getProjection() }); geolocation.on('change', function(evt) { console.log(geolocation.getPosition()); map.getView().setCenter(geolocation.getPosition()); });

أكثر...
 
أعلى