0

I want to know what's mean the following error in OpenLayers

Uncaught SyntaxError: Cannot use import statement outside a module

I get this error only when I try to execute on the following example

https://openlayers.org/en/latest/examples/vector-layer.html

Vince
20.5k16 gold badges49 silver badges65 bronze badges
asked Aug 24, 2021 at 20:45
1
  • 1
    Don't forget about the JS bundling aspect described in the OL Getting Started doc. See this post too Commented Aug 25, 2021 at 11:48

1 Answer 1

1

You need to get basic setup like nodejs in order to run openlayers examples.

answered Aug 31, 2021 at 14:27

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.