Skip to content

Instantly share code, notes, and snippets.

@burritojustice
Created October 25, 2016 19:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save burritojustice/2fb199da37946709acf57beeb0866b7b to your computer and use it in GitHub Desktop.
Save burritojustice/2fb199da37946709acf57beeb0866b7b to your computer and use it in GitHub Desktop.
chicago
#import: https://mapzen.com/carto/tron-style/tron-style.zip
import: https://mapzen.com/carto/zinc-style-more-labels/zinc-style-more-labels.yaml
sources:
stops:
type: GeoJSON
url: https://www.chicagocityscape.com/php/api.map.php?method=violations&type=violation_inspector_comments&text=stop%20all%20work&period=60
styles:
text-overlay:
base: text
#texture: pois
interactive: true
blend: overlay
blend_order: 3
point-overlay:
base: points
#texture: pois
interactive: true
blend: inlay
blend_order: 3
layers:
stopslabel:
data:
source: stops
draw:
points1:
style: points
collide: false
color: [0,0,1,0.9]
size: 20px
points2:
style: points
collide: false
color: [1,1,0,.9]
size: 14px
left:
text_source:
# function() {
# return feature.address.toLowerCase();
# }
function() {
return feature.address.replace(/\w\S*/g, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();});
}
text_wrap: 25
style: text-overlay
collide: true
offset: [-15px,0px]
font:
family: Helvetica
size: 11px
fill: [0.596, 0.659, 0.702, 1.00]
stroke:
color: black
width: 3.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment