Closed 0aveRyan closed 9 years ago
This could be nice to have provider options, but like Nick said, there's quite a bit that can be done to customize Mapbox maps. This may complicate things with all these additions. Definitely worth chatting about David. Thanks for bringing it up.
i think in the short term we may do a filter here in 1.3 so we can get David hooked up, then explore a wider integration on the next update.
sounds like a plan.
@bearded-avenger @michaelbeil a filter is a good start, definitely appreciated y'all!
I'm a longtime Mapbox and TileMill fan, top notch products and they're great about open source. However the registration and API rate limits also add complexity/complication. Perhaps consider one of those open source tileservers as a fallback or new default to keep things from breaking down if a user doesn't understand what map tiles are and their story goes viral.
I'll admit some of these tiles are pretty sexy. It's such a tough call.
it's true.
OK how about this for now, with this filter you'll be able to change the map tile provider for each individual post. So in this example snippet below, if the post id is 2211, then change the map tile provider to stamen-toner.
add_filter('aesop_map_tile_provider','test_map_filter', 10, 2);
function test_map_filter($provider, $postid) {
if(2211 == $postid) {
$provider = 'stamen-toner';
} else {
$provider = 'mapbox';
}
return $provider;
}
We used some of your data on the pull-request to automatically provide support for the providers:
stamen-toner-lite
stamen-toner
stamen-watercolor
mapquest
acetate
hydda-full
oh, also, if you leave out the whole if statement that checks for the postid, then it will use those tiles on all maps on the site.
Wow love the Toner behind the page container! Thanks for improving the implementation!
In addition to Mapbox, there are now 10 more map backdrops!
Some shortcomings