pauloborges / meteor-mapbox

Mapbox.js for Meteor apps
43 stars 34 forks source link

Support for GL #7

Closed Sivli-Embir closed 8 years ago

Sivli-Embir commented 9 years ago

Can we get an option to switch out to https://www.mapbox.com/mapbox-gl/?

pauloborges commented 9 years ago

Definitely!

What do you think of?

Mapbox.load({
    gl: boolean,
    plugins: [pluginList]
});

Of course this will break the API, but the truth is I never liked Mapbox.load(plugin, plugin, ...) API and this is an "oportunity" to fix it.

Sivli-Embir commented 9 years ago

Yep, looks good! This will also make adding more options later easier anyway.

pauloborges commented 9 years ago

Nice! I'll work on it.

pauloborges commented 9 years ago

Hi @Kestanous, could you test the devel branch?

Sivli-Embir commented 9 years ago

Thanks! Looks like it works. Not sure yet because the api is very different and my app is now breaking. Got some learning to do but I definitely have the mapboxgl object.

sbrichardson commented 9 years ago

Hi Paul,

Thanks for your work on Mapbox. I can get mapbox gl to load properly with your dev branch version. I forked your package and tried updating the url to the latest gl version (below). mapboxgl will not load after doing this. I would like to use some of the new features. Do you know why this issue is happening? something breaks. Thanks

mapboxgl: { js: ['https://api.tiles.mapbox.com/mapbox-gl-js/v0.8.1/mapbox-gl.js'], css: ['https://api.tiles.mapbox.com/mapbox-gl-js/v0.8.1/mapbox-gl.css'], },

nakhbari commented 9 years ago

Unlike regular MapboxJS, MapboxGL does not inherit Leaflet map. So you will be seeing problems with any of your regular leaflet code. If i get a chance, i will make a pull request to address this.

pauloborges commented 8 years ago

Hi @sbr464, sorry for the long delay!

I've released a new version of the package now. You can check the demo application to see how you can setup it to work:

Demo (GL): http://mapbox.meteor.com/gl

Code: https://github.com/pauloborges/meteor-mapbox/blob/master/demo/main.js#L38-L53