Add ArcGIS Feature Layers to MapBox GL JS maps as a geojson source. These data sources can be styled using output from or custom layers that reference the provided source id.
import { ArcGISVectorSource } from "mapbox-gl-esri-sources"; // setup map... const esriSource = new ArcGISVectorSource( map, 'cities-source-id', "https://sampleserver6.arcgisonline.com/arcgis/rest/services/SampleWorldCities/MapServer/0"), { geometryPrecision: 5, outFields: "POP,CITY_NAME" } );
ArcGISVectorSource
Creates an instance of ArcGISVectorSource.
MapBox GL JS map instance where source will be added
ID will be assigned to the GeoJSONSource instance
Base url for an ArcGIS Server Feature Layer. Should end in /MapServer/0..n
GeoJSONSource instance added to the map
{GeoJSONSource}
Generated using TypeDoc
Add ArcGIS Feature Layers to MapBox GL JS maps as a geojson source. These data sources can be styled using output from or custom layers that reference the provided source id.
Usage
import { ArcGISVectorSource } from "mapbox-gl-esri-sources"; // setup map... const esriSource = new ArcGISVectorSource( map, 'cities-source-id', "https://sampleserver6.arcgisonline.com/arcgis/rest/services/SampleWorldCities/MapServer/0"), { geometryPrecision: 5, outFields: "POP,CITY_NAME" } );
ArcGISVectorSource