Getting started with wrld.js
1. Sign up and get an API Key
-
If you don’t have an account yet, you will need to sign up for a Digital Twin account and confirm your email address
-
Take note of the created key, you will need it soon
2. Get wrld.js
Install using a package manager…
… or reference from a CDN
Add the following lines to the <head>
section of your HTML file:
3. Add the map to your page
The last step is to insert your API key and you’re good to go!
You can do this whenever you create a new map: Wrld.map("map", "your_api_key_here")
.
Here is a complete live example (drag the map!):
4. Add some features
Now that you have your first map, let’s add some features to it!
Take a look at some of our examples to get up and running:
Support
Got a question?
Feel free to email us at support@wrld3d.com
or use our Messenger to chat to us directly!
Got a feature request, or found a bug?
Feel free to submit to the wrld.js issue tracker on GitHub.
Troubleshooting
If you see Cross-Origin Request Blocked (or anything to do with CORS) while doing local development:
- Save your page as index.html
- Open a command prompt in this directory
- Run the command:
python -m SimpleHTTPServer 8000
- Browse to http://localhost:8000/
For more information, there’s a github issue with more details & solutions.