Anton
Anton

Reputation: 43

geolocation.bindTo() is not defined

I was following this guide. It executes normally when you visit the site but when I try to run it from my localhost it gives me the geolocation.bindTo() an error undefined. I read about it being the geolocation object is not yet created or the method executes asynchronously as far as i read here.

Here is the link: https://openlayersbook.github.io/ch10-openlayers-goes-mobile/example-02.html

this is basically tracking the location of the user using openlayers 3 with openstreetmaps.

Upvotes: 1

Views: 817

Answers (2)

Marcel GJS
Marcel GJS

Reputation: 234

bindTo is depracted with ol.dom.Input. Use "propertychange" and other listeners.

Upvotes: 2

Anton
Anton

Reputation: 43

Looks like bindTo was removed. Refer to this post: https://github.com/openlayers/ol3/pull/3472

Upvotes: 1

Related Questions