How to create ARCGIS layer and include to map
index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://app.vexcelgroup.com/map/v1/public/css/styles.css" type="text/css"/>
<style>
.map {
height: 800px;
overflow: hidden;
}
</style>
</head>
<body>
<div id="map" class="map"></div>
<script type="text/javascript" src="https://app.vexcelgroup.com/map/v1/public/Vexcel.js"></script>
<script type="text/javascript" src="main.js"></script>
</body>
</html>
main.js
const API_KEY = "YOUR_KEY";
const core = new Vexcel.Map({
target: "map",
token: API_KEY,
zoom: 5,
init: {
layers: false,
callback: () => {
const layerManager = core.getLayerManager();
const layer = new Vexcel.Layers.ARCGISLayer({
url:
"https://services9.arcgis.com/RHVPKKiFTONKtxq3/arcgis/rest/services/NDFD_Precipitation_v1/FeatureServer",
layer: "0",
visible: true,
});
layerManager.addLayer(layer);
},
},
});