rowanwins / mapbox-gl-arcgis-featureserver

A library for retrieving features from an ArcGIS FeatureServer or MapServer. This library makes tiled requests rather than simply requesting every feature.
https://rowanwins.github.io/mapbox-gl-arcgis-featureserver/
Apache License 2.0
49 stars 12 forks source link

Unable to use it via Django Templates #8

Open aneeq-ur-rehman4 opened 2 years ago

aneeq-ur-rehman4 commented 2 years ago

Hi, I have been trying hard to use this library to consume Feature Server tiles on Mapbox-gl. Using Django and can't use node to sever Django Templates.

I manage to find CDN for this library at: https://unpkg.com/browse/mapbox-gl-arcgis-featureserver@0.0.7/dist/mapbox-gl-arcgis-featureserver.min.js . After successful loading of files when I try to call "FeatureService" function, the console gives the error: Uncaught ReferenceError: FeatureService is not defined.

Is there any solution to this problem? (This is my first time reporting any issue, apologies if I'm missing something)

rowanwins commented 2 years ago

This probably needs a slight adjustment to the packaging and republishing as I accidentally set the output.name in the rollup config to the filename.

With CDN usage the usage ought to look something like

   new MapboxGlArcgisFeatureserver.FeatureServer()