I am trying to create a simple map with a search function, my minimal example is here: http://jsfiddle.net/TimLucas/vbaupe30/4/

For some reason the coords transformation after the script has received data from nominatim from EPSG 4326 to EPSG 3857 does not work well, even though it does work in an earlier instance in the script (right at the beginning).I have stepped through the function and the x - coord seems to be fine but the y - coord is wildly off.

Has anyone encountered a similar problem?

1 Answer 1


So the awnser turned out to be pretty easy, the ol.proj.transform() function needs numbers and not string (and apparently does not automatically convert these strings). So a simple Number() around the arguments sufficed. Here is the working fiddle:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.