Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

turn this proof of concept into a plugin #3

Merged
merged 1 commit into from
Sep 15, 2016
Merged

Conversation

jgravois
Copy link
Contributor

@jgravois jgravois commented May 26, 2016

resolves #2. now you can just call:

// any of: DarkGray, Gray, Hybrid, Navigation, Streets, StreetsNight, StreetsRelief, Topographic 
L.esri.Vector.basemap('DarkGray');
  • bump urls to leverage latest vector basemap styles
  • rewrite proof of concept to leverage an ES6 bundle instead
  • extend MapBoxGL class
  • add error handling for style requests
  • pass dummy token
  • don't worry about auth (because our basemaps don't require it)
  • duplicate attribution code from basemaps (work on moving to utils later)
  • figure out why its not possible to call addTo(map) immediately after instantiating the basemap. (right now the async request to fetch style json triggered during object instantiation is a problem.)
  • bundle the fork of mapbox-gl-leaflet dependency internally
    composite raster overlays in relief and hybrid basemaps are dropped entirely.
  • bundle the fork mapbox-gl dependency (required adding a jsnext:main field
    to do:

after this lands i can:

  • change repo name to esri-leaflet-vector-basemap
  • improve the attribution logic to make sure it disappears if/when the layer is removed
  • try and figure out how to bundle the minimal esri-leaflet dependencies internally

@jgravois
Copy link
Contributor Author

jgravois commented Jul 1, 2016

just need to wait for onAdd to fire async style request...

@jgravois
Copy link
Contributor Author

i finally have something i'm fairly happy with here.

since we are dealing with dependencies that are forks of other projects, it seems like the best course of action is to just bundle them right in this plugin. they aren't written in ES6, so i had some fun learning how to tweak the rollup config to bundle via 'main'.

an @Esri/leaflet-contributors code review (probably @patrickarlt) would be super helpful.
if everything looks good i'd be ready to tag a 1.0.0 release.

@jgravois
Copy link
Contributor Author

jgravois commented Sep 8, 2016

@manders i've pushed up a few commits so that the plugin will just work after a fresh npm install. let me know if you have any trouble getting it running yourself.

@patrickarlt
Copy link
Contributor

👍 🎆 :shipit:

Looks like zoom animations are flickery again because of mapbox/mapbox-gl-leaflet#47 though so that makes me sad :(

add attribution

wip: external attribution

invoke parent method too

inherit from L.layer instead

coming along

no more jsnext:main

even better

not sure what happened there

ahhh

we DO need a rollup flag to build main

rearrange, add debug, update README

a few more

terms
@jgravois jgravois merged commit feecc90 into Esri:master Sep 15, 2016
gavinr added a commit that referenced this pull request Jan 25, 2021
* chore: lint

* changed VectorTileLayer to load style from Basemap Style Service API; began changing statics.STYLES

* changed a statics.STYLES

* brought back `formatStyle` in case needed in the future

* adding new basemap style ENUMs in place of legacy style keys

* updated `quickstart-prod.html` example page

* updated README demo code snippet

* rename

* formatting

* update to pass URL to API

* gallery demo

* use leaflet.extend instead of Object.assign

* attribution

* leaflet panes

* default the attribution url

* additional attribution for imagery

* readme updates

Co-authored-by: jwasilgeo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

turn this into a plugin
2 participants