cutting-room-floor / tilemill-reference-layer

TileMill Plugin that allows adding a tiled layer from tiles.mapbox.com
14 stars 7 forks source link

allow for arbitrary tilejson URLs #9

Closed talin-trulia closed 10 years ago

talin-trulia commented 11 years ago

This is a bit of the opposite of what is asked for in issue #6.

In my workflow, I sometimes need to use reference layers that aren't hosted on mapbox.com. For this, full tileJSON URLs should be used to configure reference-layer.

This patch preserves expected behavior when using a MapBox mapID for configuration.

PetrDlouhy commented 10 years ago

I think, there is something wrong in the matching regexp, because my mapID "petrdlouhy.g873n732" doesn't get matched. If I fill it in the "reference layer" box and save, I have string "http://a.tiles.mapbox.com/v3/undefined.jsonp" in the box next time I open the settings.

talin-trulia commented 10 years ago

It should work correctly now.

PetrDlouhy commented 10 years ago

Hi. I can confirm it works now, as far as I tested.

BTW isn't there some official jsonp for default OSM tiles? I think, it would be suitable default value.

springmeyer commented 10 years ago

@PetrDlouhy - thanks for testing. As for as a tilejson for tile.osm.org: not sure but perhaps you could request one be hosted there?

@talin-trulia - Could you also update the docs in the main README for the new functionality and then I will merge?

talin-trulia commented 10 years ago

I've updated the readme. I'm not great at documentation, so it may need to be reviewed.

ftwillms commented 10 years ago

Also can confirm that this works; tried my own tileJSON URL as well as my own MapBox mapID with success. Tested against the latest in master for TileMill as well as the latest in tilemill-reference-layer (after merge).

springmeyer commented 10 years ago

thanks @ftwillms - want to fork this pull and recreate another that will merge cleanly against master. Then I'll hit the button and tag a new release.

talin-trulia commented 10 years ago

Sorry, it had been a while, and I didn't realize it no longer merged cleanly. ...for that matter, I can't actually see on github whether this pull request merges cleanly or not.

springmeyer commented 10 years ago

yeah, can't auto-merge. Can you rebase?

talin-trulia commented 10 years ago

It should merge cleanly now.

springmeyer commented 10 years ago

thanks, merged