Skip to content

Commit

Permalink
cherry pick rainers patch
Browse files Browse the repository at this point in the history
  • Loading branch information
dschwen committed May 31, 2013
1 parent da3f3d6 commit ed5ee5b
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 10 deletions.
18 changes: 9 additions & 9 deletions wma2/wikiminatlas/auto.mss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,15 @@
polygon-fill: rgb(220,220,220)
}

#polygon::landuse [zoom>=12][landuse!=''] {
#polygon::greens [zoom>=12][leisure!=''] {
[leisure='park'],[leisure='orchard'],[leisure='meadow'],
[leisure='village_green'],[leisure='forrest'],[leisure='garden'] {
polygon-fill: @grassgreen;
[zoom>=15] { line-color: darken(@grassgreen,10%); }
}
}

#polygon::landuse [zoom>=12][landuse!=''] {
[landuse='industrial'],[landuse='retail'],
[landuse='commercial'],[landuse='residential'] {
polygon-fill: @builtup;
Expand Down Expand Up @@ -76,14 +84,6 @@
}
}

#polygon::greens [zoom>=12][leisure!=''] {
[leisure='park'],[leisure='orchard'],[leisure='meadow'],
[leisure='village_green'],[leisure='forrest'],[leisure='garden'] {
polygon-fill: @grassgreen;
line-color: darken(@grassgreen,30%);
}
}

#polygon::sub7b [zoom>12] {
[leisure='golf_course'],[leisure='track'],[leisure='recreation_ground'],
[leisure='dog_park'],[leisure='pitch'],[leisure='stadium'] {
Expand Down
27 changes: 26 additions & 1 deletion wma2/wikiminatlas/project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"style.mss",
"auto.mss",
"transport.mss",
"labels.mss"
"labels.mss",
"boundaries.mss"
],
"Layer": [
{
Expand Down Expand Up @@ -461,6 +462,30 @@
"advanced": {},
"name": "states"
},
{
"extent": [
-131.69312746160912,
28.009211430996928,
-99.37272755355096,
59.99944088465797
],
"Datasource": {
"type": "postgis",
"table": "(SELECT way,boundary,admin_level FROM planet_osm_line WHERE boundary IS NOT NULL) AS data",
"key_field": "",
"geometry_field": "",
"extent_cache": "dynamic",
"extent": "",
"dbname": "gis"
},
"id": "boundary",
"class": "",
"srs-name": "900913",
"srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over",
"advanced": {},
"name": "boundary",
"geometry": "linestring"
},
{
"geometry": "linestring",
"extent": [
Expand Down
12 changes: 12 additions & 0 deletions wmacore_dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -1921,6 +1921,18 @@ labelcaption = $('<div></div>').css({position:'absolute', top: '30px', left:'60p
if( !('maxlon' in wmakml) || d.maxlon > wmakml.maxlon ) { wmakml.maxlon = d.maxlon; }
if( !('minlon' in wmakml) || d.minlon < wmakml.minlon ) { wmakml.minlon = d.minlon; }
}

// return the coordinates of the view-box
if ( 'getcoords' in d ) {
var gci = {
query: d.getcoords,
response: {
topleft: wmaXYToLatLon(wma_gx, wma_gy),
rightbottom: wmaXYToLatLon(wma_gx+wma_width,wma_gy+wma_height)
}
}
if (window.parent) { window.parent.postMessage(JSON.stringify(gci), e.origin); }
}
}

// reproject and insert the WIWOSM geoJSON data
Expand Down

0 comments on commit ed5ee5b

Please sign in to comment.