Openlayers 3 center map
I'm sing OpenLayers 3 to display a map. I want to center the map using latLon coordinates. I'm using the quickstart code to begin with. Using this code, I cannot change the center of the map. I think this has something to do with Spherical Mercator projection . Only thing is, I only have lat lon coordinates. Does anyone know how to center a map from openlayers v3? Ole Borgersen You need to transform the lon/lat coordinates to the correct projection (or coordinate system) using var olCoordinates = ol.proj.transform([lon, lat],"WGS84", "EPSG:900913") Now you can set center with olCorrdinates.