Skip to content
Browse files

Updating map styling

 - Marina and rock icon
 - fixes for labels on the depth lines
  • Loading branch information...
1 parent 935dcdd commit 85842e5caa22555ff5d6ace6de2c95bdf6842dec @ssinger committed May 5, 2012
Showing with 78 additions and 13 deletions.
  1. +16 −0 img/NChart_ECDIS_Rock_Awash.svg
  2. BIN img/transport_marina.n.24.png
  3. +38 −4 project.mml
  4. +24 −9 style.mss
View
16 img/NChart_ECDIS_Rock_Awash.svg
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ version="1.0"
+ width="140"
+ height="140"
+ id="svg3425">
+ <defs
+ id="defs3427" />
+ <path
+ d="M 32.5,70 L 107.5,70 M 40.5,37.5 L 99.5,102.5 M 40.5,102.5 L 99.5,37.5"
+ id="path3553"
+ style="fill:none;stroke:#000000;stroke-width:6;stroke-linecap:round;stroke-linejoin:round" />
+</svg>
View
BIN img/transport_marina.n.24.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
42 project.mml
@@ -13,7 +13,7 @@
"format": "png",
"interactivity": false,
"minzoom": 10,
- "maxzoom": 16,
+ "maxzoom": 18,
"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",
"Stylesheet": [
"style.mss"
@@ -77,14 +77,14 @@
"geometry": "linestring",
"Datasource": {
"type": "postgis",
- "table": "(select gid,the_geom,depth from contour_filtered) as depth",
+ "table": "(select gid,the_geom,depth::text from contour_filtered) as depth",
"extent": "",
"key_field": "gid",
"geometry_field": "the_geom",
"host": "localhost",
"dbname": "penlakemap",
"id": "depth-line",
- "project": "oakville",
+ "project": "penlakemap",
"srs": null
},
"id": "depth-line",
@@ -302,9 +302,43 @@
"srs-name": "WGS84",
"srs": "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs",
"name": "buoy"
+ },
+ {
+ "geometry": "point",
+ "Datasource": {
+ "type": "postgis",
+ "table": "(select * FROM planet_osm_point where leisure='marina') as data",
+ "extent": "",
+ "key_field": "osm_id",
+ "geometry_field": "way",
+ "host": "localhost",
+ "dbname": "penlakemap"
+ },
+ "id": "marina",
+ "class": "marina",
+ "srs-name": "WGS84",
+ "srs": "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs",
+ "name": "marina"
+ },
+ {
+ "geometry": "point",
+ "Datasource": {
+ "type": "postgis",
+ "table": "(select * FROM planet_osm_point where \"natural\"='rock') as data",
+ "extent": "",
+ "key_field": "osm_id",
+ "geometry_field": "way",
+ "host": "localhost",
+ "dbname": "penlakemap"
+ },
+ "id": "rocks",
+ "class": "rocks",
+ "srs-name": "WGS84",
+ "srs": "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs",
+ "name": "rocks"
}
],
"name": "Penlake",
"description": "",
- "attribution": ""
+ "attribution": "CC-BY-SA OpenStreetMap & Contributors. Some Depth data from the Canadian Hydrological Service. NOT FOR NAVIGATION"
}
View
33 style.mss
@@ -200,16 +200,18 @@ Map {
#depth-line {
[zoom >=16] {
+ ::label {
+ text-name: "[depth]";
+ text-face-name: @serif_italic;
+ text-size: 16;
+ text-spacing: 900;
+ text-placement: line;
+ text-fill: #000000;
+ text-allow-overlap: true;
+ text-label-position-tolerance:6;
+ text-dy: 3;
+ }
line-width:1;
- text-name: "[depth]";
- text-face-name: @serif;
- text-size: 16;
- text-spacing: 900;
- text-placement: line;
- text-fill: #000000;
- text-allow-overlap: true;
- text-label-position-tolerance:6;
- text-dy: 3;
}
[zoom < 16] {
[depth=20],[depth=40],[depth=60],[depth=80],[depth=100],[depth=120] {
@@ -248,3 +250,16 @@ Map {
point-file: url('img/openseamap/can_green.png');
}
}
+
+.marina {
+ point-file: url('img/transport_marina.n.24.png');
+ text-name: "[name]";
+ text-fill: #000000;
+ text-allow-overlap: true;
+ text-dy: 15;
+ text-face-name: @serif;
+ }
+.rocks {
+ point-file: url('img/NChart_ECDIS_Rock_Awash.svg');
+ point-transform: 'scale(0.1)';
+ }

0 comments on commit 85842e5

Please sign in to comment.
Something went wrong with that request. Please try again.