{"action":"closed","issue":{"url":"https://api.github.com/repos/openlayers/ol3/issues/3653","labels_url":"https://api.github.com/repos/openlayers/ol3/issues/3653/labels{/name}","comments_url":"https://api.github.com/repos/openlayers/ol3/issues/3653/comments","events_url":"https://api.github.com/repos/openlayers/ol3/issues/3653/events","html_url":"https://github.com/openlayers/ol3/issues/3653","id":72605652,"number":3653,"title":"Possible bug with setCenter on Open Street Maps?","user":{"login":"laggingreflex","id":2523987,"avatar_url":"https://avatars.githubusercontent.com/u/2523987?v=3","gravatar_id":"","url":"https://api.github.com/users/laggingreflex","html_url":"https://github.com/laggingreflex","followers_url":"https://api.github.com/users/laggingreflex/followers","following_url":"https://api.github.com/users/laggingreflex/following{/other_user}","gists_url":"https://api.github.com/users/laggingreflex/gists{/gist_id}","starred_url":"https://api.github.com/users/laggingreflex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laggingreflex/subscriptions","organizations_url":"https://api.github.com/users/laggingreflex/orgs","repos_url":"https://api.github.com/users/laggingreflex/repos","events_url":"https://api.github.com/users/laggingreflex/events{/privacy}","received_events_url":"https://api.github.com/users/laggingreflex/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-02T07:36:19Z","updated_at":"2015-05-02T07:58:47Z","closed_at":"2015-05-02T07:58:47Z","body":"I asked a question on StackOverflow\r\nhttp://stackoverflow.com/questions/29997918/openlayer3-cant-get-to-change-the-center-either-initially-or-with-view-setcen\r\n\r\nIf I'm missing something trivial then I apologize in advance, but it seems the `setCenter` method isn't working as expected. \r\n\r\n---\r\n\r\nI have a map that renders fine but I can't seem to set the center to an arbitrary coordinates, it always centers itself at `[0,0]`\r\n\r\n    var map = new ol.Map({\r\n        target: 'map'\r\n    });\r\n    map.setView(new ol.View({\r\n        center: [100, 100],\r\n        zoom: 10\r\n    }));\r\n    var osmSource = new ol.source.OSM();\r\n    var osmLayer = new ol.layer.Tile({\r\n        source: osmSource\r\n    });\r\n    map.addLayer(osmLayer);\r\n\r\nThis is all straight from the [basic concepts][] page. Even though I've set the center to [[100,100][]] it still centers at [0,0]\r\n\r\n[basic concepts]: http://openlayers.org/en/v3.4.0/doc/tutorials/concepts.html\r\n[100,100]: http://google.com/maps/@100,100,13z?hl=en\r\n\r\nI also added a button to change the coordinates, and even though that too does nothing, however it does change it back to [0,0] if I had moved away by dragging it somewhere else manually.\r\n\r\n    map.getView().setCenter([100, 100]);\r\n    map.setView(new ol.View({\r\n        center: [100, 100],\r\n        zoom: 10\r\n    }));\r\n\r\n\r\nhttp://jsfiddle.net/laggingreflex/egrh89j1/\r\n\r\nWhat am I doing wrong? What's the correct way to change the center?\r\n\r\n\r\n---\r\n\r\nI'm thinking maybe it's a bug in Open Street Maps. But I'm not sure. \r\n\r\nI tried it on the [example] page, directly inside the browser console. Same result.\r\n\r\n![scr][]\r\n\r\n[example]: http://openlayers.org/en/v3.4.0/examples/accessible.html\r\n[scr]: http://i.imgur.com/fl1BYtU.png\r\n\r\n---\r\n\r\nBut then I did the same thing on [Bing Maps example page][], and it worked! It's coordinate system is different but changing the center with `setCenter` works!\r\n\r\n![bing scr][]\r\n\r\n[Bing Maps example page]: http://openlayers.org/en/v3.4.0/examples/bing-maps.html\r\n[bing scr]: http://i.imgur.com/WRODylK.png\r\n\r\nSo it's a bug with Open Street Maps, right? "}}