10 new map tile sources! #172

wants to merge 3 commits into


None yet

3 participants


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

  • New cmb box added in post.php screen lets user pick new tiles
  • Tiles get sucked into both front-end component and edit.php map coordinates selector!
  • Select defaults to 'mapbox' and has an a fallback incase custom-meta isn't set.

Some shortcomings

  • Doesn't swap tiles dynamically in back-end with select dropdown.
  • Adds new cmb box in post.php screen. Couldn't be avoided due to how tiles were being loaded into leaflet. Would have preferred the dropdown in the composer next to the other Map Component settings, but alas. You know some of these challenges...
0aveRyan added some commits Nov 18, 2014
@0aveRyan 0aveRyan Multiple Tile Vendors
Add tiles from Stamen, OSM and more sources. Creates new cmb in
edit.php screen with select that connects to conditional statements in
both component-map.php files (tiles show in backend editor and
front-end display!!) with attribution to sources.

- Maintains backwards compatibility by including Mapbox as a provider
and defaulting to it, as well as including an else statement to always
fallback to the original statement even if custom meta is undefined.
Sloppy, not too much bloat and effective.
- I know it’s less than ideal to add another custom meta box, I was
originally planning to add this as another shortcode element in the
composer, but due to the way Aesop loads the tiles saving as custom
meta was important.
@0aveRyan 0aveRyan FINAL-Multiple-tile-vendors
All clean and ready-to-go. Don’t forsee any issues with this one :)
@0aveRyan 0aveRyan Multiple-Maps 715f82c

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.

@0aveRyan 0aveRyan closed this Nov 18, 2014

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


it's true.

@bearded-avenger bearded-avenger added a commit that referenced this pull request Nov 18, 2014
@bearded-avenger bearded-avenger new function + filter to change map tile provider
ref #172 props @dryanmedia

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:


image 2014-11-18 at 12 08 36 pm


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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment