Creating an HTML Page
This tutorial will walk you through creating a HTML web page to embed your map into. If you already have a web page that you want to embed your map into, you can skip to the next tutorial. Otherwise, let’s go ahead and create a basic HTML page:
- Open your text editor of choice
- Copy and paste the snippet of HTML from below into your new file
- Save the file to either your local drive or your development web server (if you have one), making sure that you save it with the
<!doctype html> <html> <head> </head> <body> <div id="example-map" style="height: 500px; position: absolute; width: 500px;"> </div> </body> </html>
It’s as simple as that. You now have a basic web page with an HTML
<div> element that’s ready to hold your web map. Note the
style property on your
<div> element. This property can be used to adjust the height and width of your web map.
Now that you have a web page, you are ready to create a web map.