Skip to content

Commit

Permalink
Merge pull request #13 from jseppi/rm-icon-list
Browse files Browse the repository at this point in the history
Remove L.MakiMarkers.icons array, add reference to external list
  • Loading branch information
jseppi authored Jan 16, 2017
2 parents 8319151 + d0a759f commit 285d30e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 20 deletions.
20 changes: 2 additions & 18 deletions Leaflet.MakiMarkers.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* References:
* Maki Icons: https://www.mapbox.com/maki/
* Mapbox Marker API: https://www.mapbox.com/api-documentation/#retrieve-a-standalone-marker
* Possible icon names: https://raw.githubusercontent.com/mapbox/maki/master/layouts/all.json
*
* Usage:
* L.MakiMarkers.accessToken = "<YOUR_ACCESS_TOKEN>";
Expand All @@ -16,23 +17,6 @@
(function () {
"use strict";
L.MakiMarkers = {
// Available Maki Icons
icons: ["airfield","airport","alcohol-shop","america-football","art-gallery","bakery","bank","bar",
"baseball","basketball","beer","bicycle","building","bus","cafe","camera","campsite","car",
"cemetery","chemist","cinema","circle-stroked","circle","city","clothing-store","college",
"commercial","cricket","cross","dam","danger","disability","dog-park","embassy",
"emergency-telephone","entrance","farm","fast-food","ferry","fire-station","fuel","garden",
"golf","grocery","hairdresser","harbor","heart","heliport","hospital","industrial",
"land-use","laundry","library","lighthouse","lodging","logging","london-underground",
"marker-stroked","marker","minefield","mobilephone","monument","museum","music","oil-well",
"park2","park","parking-garage","parking","pharmacy","pitch","place-of-worship",
"playground","police","polling-place","post","prison","rail-above","rail-light",
"rail-metro","rail-underground","rail","religious-christian","religious-jewish",
"religious-muslim","restaurant","roadblock","rocket","school","scooter","shop","skiing",
"slaughterhouse","soccer","square-stroked","square","star-stroked","star","suitcase",
"swimming","telephone","tennis","theatre","toilets","town-hall","town","triangle-stroked",
"triangle","village","warehouse","waste-basket","water","wetland","zoo"
],
accessToken: null,
defaultColor: "#0a0",
defaultIcon: "circle-stroked",
Expand All @@ -57,7 +41,7 @@
//Mapbox API access token, see https://www.mapbox.com/api-documentation/?language=CLI#access-tokens
//Instead of setting with each icon, you can set globally as L.MakiMarkers.accessToken
accessToken: null,
//Maki icon: any from https://www.mapbox.com/maki/ (ref: L.MakiMarkers.icons)
//Maki icon: any valid name, see https://raw.githubusercontent.com/mapbox/maki/master/layouts/all.json
icon: L.MakiMarkers.defaultIcon,
//Marker color: short or long form hex color code
color: L.MakiMarkers.defaultColor,
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ The most recent version of Mapbox's static API (v4) requires that a valid access
L.MakiMarkers.accessToken = "<YOUR_ACCESS_TOKEN>";

// Specify a Maki icon name, hex color, and size (s, m, or l).
// An array of icon names can be found in L.MakiMarkers.icons or at https://www.mapbox.com/maki/
// A list of available icon names can be found at
// https://raw.githubusercontent.com/mapbox/maki/master/layouts/all.json
// Lowercase letters a-z and digits 0-9 can also be used. A value of null will result in no icon.
// Color may also be set to null, which will result in a gray marker.
var icon = L.MakiMarkers.icon({icon: "rocket", color: "#b0b", size: "m"});
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Leaflet.MakiMarkers",
"main": "Leaflet.MakiMarkers.js",
"version": "2.0.0",
"version": "3.0.0",
"homepage": "https://github.com/jseppi/Leaflet.MakiMarkers",
"authors": [
"James Seppi <[email protected]>"
Expand Down

0 comments on commit 285d30e

Please sign in to comment.