1

Has anyone been able to get TileMill's reference layer plugin to work w/ a TileJSON definition?

In its description, it says it can work either with a mapbox map id or a tileJSON url. I've tried it out successfully with map ids, but when I give it a url to my tileJSON here, nothing loads and the console outputs:

[tilemill] Client Error: Script error. [tilemill] at :0 [tilemill] Client Error: TypeError: 'undefined' is not an object (evaluating 'a.tiles') [tilemill] at http://127.0.0.1:20009/assets/tilemill/js/vendor.js:5164

Anyone had any luck with this?

Update: the tileJSON file must be hosted on a server that supports CORS. That solved one problem, but still doesn't work w/ the plugin (same error output).

2 Answers 2

2

It would be great if you could just add these tileJSON files anywhere like your dropbox account. The TileMill extension expects a service to provide the file to the extension. As noted at the bottom of the link you provided, "If you have a custom tileset available elsewhere, you'll need a TileJSON service to describe this map. You can use the URL of this service for the Reference Layer field." The MapBox id appears to be a shortcut to their TileJSon service.

1
  • Well that will do it. Guess we'll be looking into setting up our own service. @Greg thanks for the help. Commented Aug 12, 2014 at 16:23
0

Try it in Firefox browser. On my end, apps that use a .json file are working fine in firefox while not working in Chrome.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.