mapbox / leaflet-omnivore

universal format parser for Leaflet & Mapbox.js
https://www.mapbox.com/mapbox.js/example/v1.0.0/omnivore-gpx/
Other
651 stars 126 forks source link

Leaflet or Mapbox #52

Closed dper closed 9 years ago

dper commented 9 years ago

Is this designed for leaflet.js or for mapbox.js? The latter is a plugin for the former, and currently the examples and tests refer to it.

If this script can be used with leaflet.js alone, it would be nice to have some tests or examples showing how. If not, that's worth noting explicitly.

tmcw commented 9 years ago

The description is universal format parser for Leaflet & Mapbox.js, and it's called leaflet-omnivore and the readme specifically discusses Leaflet. All of the examples, except ones that reference stuff like L.mapbox.featureLayer explicitly, will work identically with just Leaflet as they do with Mapbox.js.

dper commented 9 years ago

I've been testing using leaflet.js and none of the examples have not worked for me. But I don't know why.

If I take the examples and simply replace mapbox.js with leaflet.js in the <script> call, should they work as-is? (Excepting L.mapbox stuff).

tmcw commented 9 years ago

You'll need to open another issue with much more detail: for instance, a link to a full example of the code you're trying to get to run, or a JavaScript error you see when it doesn't work.

dper commented 9 years ago

Thanks for your help! I'll definitely do that.

Have you actually tested using leaflet.js as a drop-in replacement for mapbox.js? Is it supposed to work, and if so, should I have to change anything other than the <script> call? I don't want to waste time trying to get something to work that's not supposed to...

tmcw commented 9 years ago

Yes.