Creating a Web Map
Now let's walk through the process of getting a new map up and running in the web page you created in the last step.
Use your text editor to open the
.htmlfile you created in the last step
Copy and paste the
<script>tag and its content (highlighted below) into your HTML file, just above the closing body tag (
NPMap, to hold properties that NPMap will use to build out the web map, sets the base API to
And that's it! You can now load your HTML page into your web browser, and the map will render into the div on your web page.
Try using your web browser's development tools to change the height and width style properties of the map
<div>. You'll notice that the web map automatically resizes to fit 100% of the height and width of the div.
Next let's configure the map to use some default base layers.