You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cool, that looks perfect. I guess we just need to make sure that it can be relied upon as an API. There is a difference between mapbox.com (GitHub) and tiles.mapbox.com (geo-redundant cloud).
This seems unnecessary. The locator project is just using gh-pages atm, and the difference between 'github' and 'geo-redundant cloud' is slight. If you need 100% uptime, have your makefile wget the file into your project.
That's great for when I build the project, but the SDK lives on in apps that deploy in the wild. Dependencies include the user updating the app and the developer updating the SDK in the source. It's not a viable option for non-web apps.
To clarify: an API for getting the list of icons could enable a developer to build an app allowing selection of marker icon on the fly. So I'm talking also about uses beyond offline pre-bundling of the icons.
So in the case of Locator, @heyitsgarrett has to watch Maki, and periodically, as icons are added, update that project manually or not benefit from the new icons.
Same for the SDK. I need to watch Maki, determine when enough icons have been added to warrant rolling a new version of the SDK, do that, and then get developers to upgrade. And then users to update the apps.
There is more power for developers in making this an API, and less administrivia for our team to deal with.
I actually couldn't find this JSON earlier, but I could poll this list rather easily on my end for the Locator icons, so I don't really have a dog in this fight.
The aforementioned https://github.com/mapbox/maki/blob/gh-pages/www/maki.json link is now dead.
Correcting it for https://github.com/mapbox/maki/blob/mb-pages/www/maki.json now reveals a literal symbolic link description that also does not work.
I can eventually find https://github.com/mapbox/maki/blob/mb-pages/_includes/maki.json, but will that stay up? Can we build add MapBox marker support mbxmapkit#5 (comment) atop it?
My bad, I missed it in @tmcw's original comment about that in rescanning this. Disregard above about branch-specific source URLs, and sorry.
This is still unresolved though. Two parts:
Making sure new icons are added to this when available so that if someone adds one (or observes it being added) to the Maki project, they have it available via this API as well. i.e. if someone is building an application with our iOS tools, they should be able to extend to their users the ability to show a palette of available icons. This shouldn't depend on someone having to update the source code SDK, nor should it slip through the cracks as part of a manual JSON editing process.
Versioning, discussed briefly in Versioning #61. We shouldn't deploy native code leaning on an unversioned URL which could 1) go away or 2) change format arbitrarily and require a (possibly two week) lead time on updating source code in an app to remedy. If we are going to build native code around this, it should be a real API, not just a JSON document hosted someplace.
Making sure new icons are added to this when available so that if someone adds one (or observes it being added) to the Maki project, they have it available via this API as well. i.e. if someone is building an application with our iOS tools, they should be able to extend to their users the ability to show a palette of available icons. This shouldn't depend on someone having to update the source code SDK, nor should it slip through the cracks as part of a manual JSON editing process.
Icons will never slip through the cracks. In order to generate the CSS for the maki site, this JSON file needs a record of the icon. I make sure all pull requests include updates to the JSON.
Versioning, discussed briefly in #61. We shouldn't deploy native code leaning on an unversioned URL which could 1) go away or 2) change format arbitrarily and require a (possibly two week) lead time on updating source code in an app to remedy.
This is just about properly tagging releases via github right? Not that experienced versioning but next time I update the Maki project I'll add a tag and make a release.
it should be a real API, not just a JSON document hosted someplace.
This is just about properly tagging releases via github right? Not that experienced versioning but next time I update the Maki project I'll add a tag and make a release.
To address this and your last point @samanpwbb, the difference is a version number in the URL, a là http://tiles.mapbox.com/v3.... The reason for this is there will be shipping native code in the wild pointing to a certain URL and if we want to change things up, we then require developers to sync releases (as well as user updates) to this URL change, which is basically impossible (both in terms of logistics and in terms of native code updates having a store review period). Analogy: you make a great site update, then "simply" require your users to all update their browsers as you push it live.
If we like it how it is, we should add v1 to the URL, setup monitoring tests to make sure it's up, and then point native code at it.
Do you have any ideas for how to maintain Maki in a more useful way?
Unless I'm missing something, we should roll this out as we are tiles, directions, geocoding, etc., though I think it's far simpler as its static content between updates.
There are no reasons to expect breaking changes to Maki. I think it'd be a bad idea to force our tools to use (or suggest that others should use) a static version of the icon set. I like the fact that I can incrementally update the icon set as soon as new icons are added and they're immediately available to everyone.
Sorry if I'm not being clear here. I want exactly that -- to not force tying Maki updates directly to our tools, but rather to have a reliable API for our (native) tools to query what's available and what each icon is called.
What I want is to make this flow possible to our native developers:
App queries .../maki.json and finds out what's available.
App can then present an interface to user that builds on this info, such as allowing them to search for icons to add to their map via the tags we use or simply to use a template URL like http://api.tiles.mapbox.com/v3/marker/pin-m-{blah}.png and combine that with the always-updated list of available icons to show the icons in app.
Without a reliable, versioned place to get the list of icons from, they can never fill in the {blah} dynamically based on the API info. Each release of the source code would be tied to whatever icons were available in Maki at the time of release to developers, frozen in time.
Hold on this; chatted offline and cleared some things up. I will add some tests to the repo that ensure the format is kept around / not broken so we can rely on it for production native code.
I just added some Mocha tests for the basics of what I'm looking for: ability to fetch on production URL and ability to parse the resulting JSON.
Just to double-check, from what I could see:
Travis runs language-specific tests, in this case npm test.
This in turn runs Mocha as defined in package.json.
Mocha runs test/maki.test.js.
I will add some more tests at a later time for checking expected structure, but pending above, we can call this done for now. Can someone confirm and close?
Activity
heyitsgarrett commentedon Mar 21, 2013
Ah, I was running into this too last week when I was digging into Maki. Great idea.
tmcw commentedon Mar 21, 2013
Isn't this what https://github.com/mapbox/maki/blob/gh-pages/www/maki.json is? Online at http://mapbox.com/maki/www/maki.json
incanus commentedon Mar 21, 2013
Cool, that looks perfect. I guess we just need to make sure that it can be relied upon as an API. There is a difference between
mapbox.com(GitHub) andtiles.mapbox.com(geo-redundant cloud).samanpwbb commentedon Mar 21, 2013
Yeah, I try to make sure http://mapbox.com/maki/www/maki.json is up to date. What it would take to dependably keep
http://mapbox.com/maki/www/maki.jsonavailable so you'd feel comfortable referencing it in your code? I'm guessing this is not an easy task? What are the options? Would add complexity to deploying maki that I don't know anything about.incanus commentedon Mar 21, 2013
@willwhite any thoughts on that?
tmcw commentedon Mar 21, 2013
This seems unnecessary. The locator project is just using gh-pages atm, and the difference between 'github' and 'geo-redundant cloud' is slight. If you need 100% uptime, have your makefile wget the file into your project.
incanus commentedon Mar 21, 2013
That's great for when I build the project, but the SDK lives on in apps that deploy in the wild. Dependencies include the user updating the app and the developer updating the SDK in the source. It's not a viable option for non-web apps.
tmcw commentedon Mar 21, 2013
You would have your XcodeMakefile or whatever copy the file into the SDK and distribute that. People would get updated icons when they update the SDK.
incanus commentedon Mar 21, 2013
To clarify: an API for getting the list of icons could enable a developer to build an app allowing selection of marker icon on the fly. So I'm talking also about uses beyond offline pre-bundling of the icons.
tmcw commentedon Mar 21, 2013
And that list could be prepackaged in the SDK, pulled from the existing maki.json file. What am I missing here?
incanus commentedon Mar 21, 2013
So in the case of Locator, @heyitsgarrett has to watch Maki, and periodically, as icons are added, update that project manually or not benefit from the new icons.
Same for the SDK. I need to watch Maki, determine when enough icons have been added to warrant rolling a new version of the SDK, do that, and then get developers to upgrade. And then users to update the apps.
There is more power for developers in making this an API, and less administrivia for our team to deal with.
heyitsgarrett commentedon Mar 21, 2013
I actually couldn't find this JSON earlier, but I could poll this list rather easily on my end for the Locator icons, so I don't really have a dog in this fight.
incanus commentedon Feb 24, 2014
Case in point:
https://github.com/mapbox/maki/blob/gh-pages/www/maki.jsonlink is now dead.https://github.com/mapbox/maki/blob/mb-pages/www/maki.jsonnow reveals a literal symbolic link description that also does not work.https://github.com/mapbox/maki/blob/mb-pages/_includes/maki.json, but will that stay up? Can we build add MapBox marker support mbxmapkit#5 (comment) atop it?samanpwbb commentedon Feb 24, 2014
@incanus what's wrong with https://www.mapbox.com/maki/www/maki.json ? This shouldn't change.
incanus commentedon Feb 24, 2014
My bad, I missed it in @tmcw's original comment about that in rescanning this. Disregard above about branch-specific source URLs, and sorry.
This is still unresolved though. Two parts:
samanpwbb commentedon Feb 24, 2014
Icons will never slip through the cracks. In order to generate the CSS for the maki site, this JSON file needs a record of the icon. I make sure all pull requests include updates to the JSON.
This is just about properly tagging releases via github right? Not that experienced versioning but next time I update the Maki project I'll add a tag and make a release.
I'm going to pull the "just a designer" card on this. Do you have any ideas for how to maintain Maki in a more useful way? Would be cool do be able to do more with the icon set. Can we learn anything from the http://api.thenounproject.com/ ?
incanus commentedon Feb 24, 2014
To address this and your last point @samanpwbb, the difference is a version number in the URL, a là
http://tiles.mapbox.com/v3.... The reason for this is there will be shipping native code in the wild pointing to a certain URL and if we want to change things up, we then require developers to sync releases (as well as user updates) to this URL change, which is basically impossible (both in terms of logistics and in terms of native code updates having a store review period). Analogy: you make a great site update, then "simply" require your users to all update their browsers as you push it live.If we like it how it is, we should add
v1to the URL, setup monitoring tests to make sure it's up, and then point native code at it.Unless I'm missing something, we should roll this out as we are tiles, directions, geocoding, etc., though I think it's far simpler as its static content between updates.
samanpwbb commentedon Feb 24, 2014
@incanus one more thing on versioning:
There are no reasons to expect breaking changes to Maki. I think it'd be a bad idea to force our tools to use (or suggest that others should use) a static version of the icon set. I like the fact that I can incrementally update the icon set as soon as new icons are added and they're immediately available to everyone.
samanpwbb commentedon Feb 24, 2014
Maki site is deployed the same way all the rest of our mb-pages sites are deployed. Don't we monitor this?
incanus commentedon Feb 24, 2014
Sorry if I'm not being clear here. I want exactly that -- to not force tying Maki updates directly to our tools, but rather to have a reliable API for our (native) tools to query what's available and what each icon is called.
What I want is to make this flow possible to our native developers:
.../maki.jsonand finds out what's available.tagswe use or simply to use a template URL likehttp://api.tiles.mapbox.com/v3/marker/pin-m-{blah}.pngand combine that with the always-updated list of available icons to show the icons in app.Without a reliable, versioned place to get the list of icons from, they can never fill in the
{blah}dynamically based on the API info. Each release of the source code would be tied to whatever icons were available in Maki at the time of release to developers, frozen in time.incanus commentedon Feb 24, 2014
Hold on this; chatted offline and cleared some things up. I will add some tests to the repo that ensure the format is kept around / not broken so we can rely on it for production native code.
samanpwbb commentedon Feb 24, 2014
👍
refs #60: add some basic production endpoint tests
incanus commentedon Feb 25, 2014
I just added some Mocha tests for the basics of what I'm looking for: ability to fetch on production URL and ability to parse the resulting JSON.
Just to double-check, from what I could see:
npm test.package.json.test/maki.test.js.I will add some more tests at a later time for checking expected structure, but pending above, we can call this done for now. Can someone confirm and close?