This demo shows how to use the <esri-map-view>
custom component on a web page without a bundler. To view this webpage open index.html
in a web browser. The package is loaded from the npm package registry CDN.
Review the code in index.html
.
-
Load the script from the npm CDN:
<script type="module" src="https://unpkg.com/[email protected]/dist/esri-map-view/esri-map-view.esm.js"></script>
-
Setup the HTML and CSS for your use of the custom component:
<esri-map-view ...></esri-map-view>
-
Set your API key
<esri-map-view apikey="YOUR_API_KEY"
-
Set the attributes to the component for your use case. Refer to the documentation for an explanation of each attribute.