Commit b9221514 authored by Adrien Pavie's avatar Adrien Pavie
Browse files

Icon for mapcss styles, support imports in cascade for MapCSS files

parent 310f8ae6
......@@ -8,10 +8,6 @@ OUTPUT_FOLDER=./dist/styles
IFS=''
function process {
output=$OUTPUT_FOLDER/`basename $1`
# Clear previous output
echo "" > $output
regex="^@import url\('(.*)'\)\;$"
# Read MapCSS
......@@ -22,16 +18,18 @@ function process {
if ! test -r $STYLE_FOLDER/${BASH_REMATCH[1]}; then
echo "File ${BASH_REMATCH[1]} not readable"
else
echo "/** Import of ${BASH_REMATCH[1]} **/" >> $output
cat $STYLE_FOLDER/${BASH_REMATCH[1]} >> $output
echo "/** Import of ${BASH_REMATCH[1]} **/"
process $STYLE_FOLDER/${BASH_REMATCH[1]}
fi
# If not, echo line
else
echo "$line" >> $output
echo "$line"
fi
done
}
for i in $STYLE_FOLDER/*.mapcss; do
process $i
output=$OUTPUT_FOLDER/`basename $i`
process $i > $output
done
<!DOCTYPE html5>
<html>
<!--
This file is part of OpenLevelUp!.
OpenLevelUp! is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
any later version.
OpenLevelUp! is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with OpenLevelUp!. If not, see <http://www.gnu.org/licenses/>.
-->
<!--
OpenLevelUp!
Web viewer for indoor mapping (based on OpenStreetMap data).
Author: Adrien PAVIE
Example page
-->
<head>
<!-- General definitions -->
<title>OpenLevelUp!</title>
<meta charset="utf-8" />
<meta name="description" content="See inside buildings with OpenLevelUp! Based on OpenStreetMap indoor data." />
<meta name="keywords" content="openlevelup, openstreetmap, osm, building, indoor, level, floor, map, viewer" />
<meta name="author" content="Adrien PAVIE (PanierAvide)" />
<meta name="copyright" content="&copy; Adrien PAVIE 2015-2016, under AGPL v3" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<link rel="icon" type="image/png" href="img/favicon.png" />
<!-- Stylesheets -->
<link rel="stylesheet" href="OLU.min.css" />
</head>
<body>
<!-- OpenLevelUp div -->
<div id="openlevelup"></div>
<!-- JS libraries -->
<script src="OLU.js"></script>
<!--script src="OLU.min.js"></script-->
<!-- Init code -->
<script>
var myOlu = OLU.init("openlevelup", "conf", "advanced");
</script>
</body>
</html>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
x="0px"
y="0px"
viewBox="0 0 72 72"
enable-background="new 0 0 72 72"
xml:space="preserve"
id="svg2"
inkscape:version="0.91 r13725"
sodipodi:docname="icon_loupe.svg"><metadata
id="metadata10"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
id="defs8" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1600"
inkscape:window-height="843"
id="namedview6"
showgrid="false"
inkscape:zoom="3.2777778"
inkscape:cx="-4.1186441"
inkscape:cy="36"
inkscape:window-x="0"
inkscape:window-y="595"
inkscape:window-maximized="1"
inkscape:current-layer="svg2" /><path
d="M69.6,58L53.4,38.6c-0.6-0.7-0.6-1.7-0.1-2.5c5.4-7.3,6-17.6,0.6-25.6c-7.3-10.9-22.7-13.4-33-4.7 c-6.8,5.7-9.4,15-7,23.3c0.1,0.2-0.1,0.4-0.3,0.4H2.4c-0.8,0-1.5,0.7-1.5,1.5s0.7,1.5,1.5,1.5h12.2c0.3,0,0.6,0.2,0.8,0.5 c0.3,0.6,0.9,1.7,1.3,2.2c5.3,8.1,15.1,11.6,24,9.4c0.9-0.2,1.8,0.2,2.3,1L54.6,68c1.8,3.4,6.1,4.5,9.3,2.4l4.3-2.9 C71.4,65.4,72.1,61,69.6,58z M46.3,35.8c-7.9,6.6-19.6,4.8-25.2-3.6c0-0.1-0.1-0.1-0.1-0.2c0.2-0.2,0.4-0.4,0.5-0.6l5-11.6l0.5,5.6 c0.1,0.6,0.5,1.2,1.1,1.3c0.6,0.2,1.3-0.1,1.6-0.6l4.1-6.2v9.4c0,0.6,0.4,1.2,1,1.4c0.6,0.2,1.3,0,1.7-0.5l3-3.9l1,2.3 c0.3,0.8,1.2,1.1,1.9,0.8l5.4-2.1c0.7-0.3,1.2-1,1-1.7c-0.2-0.9-1.2-1.4-2-1.1l-4.1,1.6l-1.4-3.4c-0.2-0.5-0.7-0.8-1.2-0.9 c-0.5-0.1-1.1,0.1-1.4,0.6L37,25v-9.9c0-0.7-0.4-1.2-1.1-1.4c-0.6-0.2-1.3,0-1.7,0.6l-4.5,6.8L29,13.8c-0.1-0.7-0.6-1.2-1.3-1.3 c-0.7-0.1-1.3,0.3-1.6,0.9l-6.4,14.9c-0.1,0.2-0.5,0.2-0.5,0c-2.3-7.1,0.2-15.2,6.7-19.5c8.3-5.6,19.9-2.8,24.6,6.4 C54.1,22,52.3,30.8,46.3,35.8z"
id="path4"
fill="#000000"
style="fill:#ffffff;fill-opacity:1" /></svg>
\ No newline at end of file
......@@ -2,6 +2,7 @@
meta {
title: 'Accessibility';
icon-image: url('icon_wheelchair.png');
}
line[highway][guide_strips=yes] {
......
@import url('default.mapcss');
meta {
title: 'Basic';
title: 'Points of interest';
icon-image: url('icon_cuisine.png');
}
......
meta {
title: 'Default';
title: 'Building structure';
icon-image: url('favicon.png');
}
......
@import url('default.mapcss');
@import url('basic.mapcss');
meta {
title: 'Details';
icon-image: url('icon_settings.png');
title: 'High level of detail';
icon-image: url('icon_loupe.png');
}
node, way {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment