ol-geocoder: Broken on Openlayers 7.1.0

Since updating to latest OL 7.1.0 i get the following error in the console:

Uncaught TypeError: class constructors must be invoked with 'new'

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 2
  • Comments: 23 (6 by maintainers)

Most upvoted comments

Hey guys, I have published my forked repo of ol-geocoder which is compatible with openlayers 7. I’ll be maintaining the fork. https://www.npmjs.com/package/@kirtandesai/ol-geocoder

Till then, here are the dist files. Let me know if there’s any issue.

Thank you. This dist works perfectly for me.

@Dominique92 perhaps try disabling transpiling by commenting out the buble plugin in https://github.com/jonataswalker/ol-geocoder/blob/master/build/config.js#L54

Already did that. It works. Making up a PR after upgrading to v7 in examples

EDIT: PR is made. Please review it. #259

Just clone my repo, run npm i and then run npm run build. You’ll get the files in dist folder.

Sorry, I use Windows where npm is a mess, not linux I will wait the dist

I don’t know when my PR will be reviewed. Till then, here are the dist files. Let me know if there’s any issue.

I am working on the issue. The Base class in base.js calls super after accessing “this” which throws an error in ES6. Trying to refactor that.

EDIT: Done with this. ol-geocoder will now ship with ES6 classes. Will make a PR. Only issue I’m facing now is that the magnifying glass is not visible on the button since OL7 has default white background for colors. Will try to change color of magnifying glass.

Thanks for taking a look into it and fixing it 😃