hyunsupul / aesop-core

Open-sourced suite of components that empower interactive storytelling in WordPress.
http://aesopstoryengine.com
GNU General Public License v2.0
245 stars 56 forks source link

10 new map tile sources! #172

Closed 0aveRyan closed 9 years ago

0aveRyan commented 9 years ago

In addition to Mapbox, there are now 10 more map backdrops!

Some shortcomings

michaelbeil commented 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.

bearded-avenger commented 9 years ago

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.

michaelbeil commented 9 years ago

sounds like a plan.

0aveRyan commented 9 years ago

@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.

bearded-avenger commented 9 years ago

I'll admit some of these tiles are pretty sexy. It's such a tough call.

michaelbeil commented 9 years ago

it's true.

bearded-avenger commented 9 years ago

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
bearded-avenger commented 9 years ago

image 2014-11-18 at 12 08 36 pm

bearded-avenger commented 9 years ago

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.

0aveRyan commented 9 years ago

Wow love the Toner behind the page container! Thanks for improving the implementation!