Skip to content

Commit 5a9a489

Browse files
prushforprushfor
authored andcommitted
Add CSS rule for .mapml-popup-overflow.
Change license description in bower.json to W3C SOFTWARE AND DOCUMENT
1 parent 3b27650 commit 5a9a489

File tree

6 files changed

+113
-10
lines changed

6 files changed

+113
-10
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"Maps for HTML Community Group"
77
],
88
"homepage": "http://maps4html.github.io/Web-Map-Custom-Element/",
9-
"license": "W3C",
9+
"license": "W3C SOFTWARE AND DOCUMENT NOTICE AND LICENSE",
1010
"keywords": [
1111
"web-components",
1212
"polymer",
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8" />
5+
<title>&lt;map&gt; type extension custom element</title>
6+
<link rel='icon' href='MapsForHTML_16x16.png' sizes='16x16'>
7+
<script src="../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
8+
<link rel="import" href="../web-map.html">
9+
<style>
10+
/* map must have a defined height and width, can be set either by @height/@width or with css properties */
11+
map {
12+
float: left;
13+
padding-right: 20px;
14+
padding-bottom: 10px;
15+
height: 350px;
16+
width: 640px;
17+
}
18+
.mapclasstest {
19+
height: 300px;
20+
width: 600px;
21+
}
22+
.transparency {
23+
opacity: 0.2;
24+
}
25+
area#line {
26+
fill: none;
27+
stroke: purple;
28+
stroke-width: 7px;
29+
stroke-opacity: 1.0;
30+
stroke-linecap: round;
31+
}
32+
</style>
33+
</head>
34+
<body>
35+
<div>
36+
<!-- the @width / @height attributes take precedence over properties, but currently don't change to reflect updates -->
37+
<map is="web-map" projection="CBMTILE" zoom="17" lat="45.398043" lon="-75.70683" width="700" height="400" controls>
38+
<layer- id="cbmt" label="Composite cache+WMS layer" src="image-service-CBMTILE.mapml" checked></layer->
39+
<layer- id="forestfires" label="Wildfire risk index" src="tile-cache-CBMTILE.mapml"></layer->
40+
41+
</map>
42+
</div>
43+
</body>
44+
</html>

demo/image-service-CBMTILE.mapml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<mapml>
2+
<head>
3+
<title>A CBMTILE tile cache in Map Markup Language</title>
4+
<meta http-equiv="Content-Type" content="text/mapml"/>
5+
<meta charset="utf-8"/>
6+
<meta name="projection" content="CBMTILE"/>
7+
<meta name="zoom" content="min=0,max=17"/>
8+
<link rel="license" href="https://www.nrcan.gc.ca/earth-sciences/geography/topographic-information/free-data-geogratis/licence/17285" title="Canada Base Map © Natural Resources Canada"/>
9+
</head>
10+
<body>
11+
<extent units="CBMTILE">
12+
<input name="z00m" type="zoom" value="0" min="0" max="17"/>
13+
<input name="col" type="location" units="tilematrix" axis="column"/>
14+
<input name="row" type="location" units="tilematrix" axis="row"/>
15+
<input name="w" type="width"/>
16+
<input name="h" type="height"/>
17+
<input name="xmin" type="location" units="pcrs" position="top-left" axis="easting"/>
18+
<input name="ymin" type="location" units="pcrs" position="bottom-left" axis="northing"/>
19+
<input name="xmax" type="location" units="pcrs" position="top-right" axis="easting"/>
20+
<input name="ymax" type="location" units="pcrs" position="top-left" axis="northing"/>
21+
<input name="xmn" type="xmin" min="768.0" max="1024.0"/>
22+
<input name="ymn" type="ymin" min="768.0" max="1280.0"/>
23+
<input name="xmx" type="xmax" min="768.0" max="1024.0"/>
24+
<input name="ymx" type="ymax" min="768.0" max="1280.0"/>
25+
<input name="p" type="projection" value="CBMTILE"/>
26+
<template type="tile" tref="https://geoappext.nrcan.gc.ca/arcgis/rest/services/BaseMaps/CBMT3978/MapServer/tile/{z00m}/{row}/{col}?m4h=t"/>
27+
<template type="image" tref="http://wms.ess-ws.nrcan.gc.ca/wms/toporama_en?SERVICE=WMS&amp;REQUEST=GetMap&amp;FORMAT=image/jpeg&amp;TRANSPARENT=FALSE&amp;STYLES=&amp;VERSION=1.3.0&amp;LAYERS=WMS-Toporama&amp;WIDTH={w}&amp;HEIGHT={h}&amp;CRS=EPSG:3978&amp;BBOX={xmin},{ymin},{xmax},{ymax}&amp;m4h=t"/>
28+
</extent>
29+
</body>
30+
</mapml>

demo/index.html

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,24 +34,23 @@
3434
<body>
3535
<div>
3636
<!-- the @width / @height attributes take precedence over properties, but currently don't change to reflect updates -->
37-
<!-- <img usemap="#dowslake" src="map1.png" width="700" height="400" alt="Dow's Lake area" />-->
37+
<img usemap="#dowslake" src="map1.png" width="700" height="400" alt="Dow's Lake area" />
3838
<map name="dowslake" is="web-map" zoom="17" lat="45.398043" lon="-75.70683" width="700" height="400" controls hidden>
39-
<layer- id="osm" src="http://geogratis.gc.ca/mapml/en/osmtile/osm/" label="Open Street Map" checked ></layer->
40-
<device-location centered></device-location>
41-
<!-- <layer- id="cbmt" label="Canada Base Map" src="http://geogratis.gc.ca/mapml/en/osmtile/cbmt/" checked></layer->-->
42-
<!-- <layer- id="canvec" label="CanVec+ 031G" src="http://geogratis.gc.ca/mapml/canvec/50k/features/" class="transparency"></layer->
43-
the HTML author can create MapML files and serve them as layers if they prefer
39+
<layer- id="osm" src="http://geogratis.gc.ca/mapml/en/osmtile/osm/" label="Open Street Map" checked hidden></layer->
40+
<layer- id="cbmt" label="Canada Base Map" src="http://geogratis.gc.ca/mapml/en/osmtile/cbmt/" checked></layer->
41+
<layer- id="canvec" label="CanVec+ 031G" src="http://geogratis.gc.ca/mapml/canvec/50k/features/" class="transparency"></layer->
42+
<!-- the HTML author can create MapML files and serve them as layers if they prefer -->
4443
<layer- id="marker" label="Marker layer" src="marker.mapml"></layer->
4544

46-
or the HTML author can create map 'area's (links) within the HTML document
47-
<area is="map-area"id="wholemap" href='http://example.com/default/' alt="Default" shape="default" style="fill: salmon; stroke: none; fill-opacity: 0.01"></map-area>
45+
<!-- or the HTML author can create map 'area's (links) within the HTML document -->
46+
<!-- <area is="map-area"id="wholemap" href='http://example.com/default/' alt="Default" shape="default" style="fill: salmon; stroke: none; fill-opacity: 0.01"></map-area>-->
4847
<area is="map-area" id="marker2" href='http://example.com/marker/' alt="Marker" coords="265,185,265,185" shape="marker">
4948
<area is="map-area" id="line" href='http://example.com/line/' alt="Line" coords="275,275,540,107" shape="line">
5049

5150
<area is="map-area" id="doughnut" alt="Circle" href='http://example.com/circle/' coords="250,250,25" shape="circle" style="fill: white; stroke: aqua; stroke-width: 5px;fill-opacity: 0.0">
5251
<area is="map-area" id="hole" coords="250,250,7" shape="circle" style="fill: blue; stroke: none;fill-opacity: 0.3;">
5352
<area is="map-area" id="rect" href='http://example.com/rectangle/' alt="Rectangle" coords="345,290,415,320" shape="rect" style="fill: greenyellow; stroke: blue; stroke-width: 3px;fill-opacity: 0.4">
54-
<area is="map-area" id="poly" href='http://example.com/polygon/' alt="Polygon" coords="392,116,430,100,441,128,405,145" shape="poly" style="fill: pink; stroke: blue; stroke-width: 3px;fill-opacity: 0.4">-->
53+
<area is="map-area" id="poly" href='http://example.com/polygon/' alt="Polygon" coords="392,116,430,100,441,128,405,145" shape="poly" style="fill: pink; stroke: blue; stroke-width: 3px;fill-opacity: 0.4">
5554
</map>
5655
</div>
5756
</body>

demo/tile-cache-CBMTILE.mapml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<mapml>
2+
<head>
3+
<title>A CBMTILE tile cache in Map Markup Language</title>
4+
<meta http-equiv="Content-Type" content="text/mapml"/>
5+
<meta charset="utf-8"/>
6+
<meta name="projection" content="CBMTILE"/>
7+
<meta name="zoom" content="min=0,max=17"/>
8+
<link rel="license" href="https://www.nrcan.gc.ca/earth-sciences/geography/topographic-information/free-data-geogratis/licence/17285" title="Canada Base Map © Natural Resources Canada"/>
9+
</head>
10+
<body>
11+
<extent units="CBMTILE">
12+
<input name="z00m" type="zoom" value="0" min="0" max="17"/>
13+
<input name="col" type="location" units="tilematrix" axis="column"/>
14+
<input name="row" type="location" units="tilematrix" axis="row"/>
15+
<input name="xmin" type="location" units="tilematrix" position="top-left" axis="easting"/>
16+
<input name="ymin" type="location" units="tilematrix" position="bottom-left" axis="northing"/>
17+
<input name="xmax" type="location" units="tilematrix" position="top-right" axis="easting"/>
18+
<input name="ymax" type="location" units="tilematrix" position="top-left" axis="northing"/>
19+
<input name="xmn" type="xmin" min="768.0" max="1024.0"/>
20+
<input name="ymn" type="ymin" min="768.0" max="1280.0"/>
21+
<input name="xmx" type="xmax" min="768.0" max="1024.0"/>
22+
<input name="ymx" type="ymax" min="768.0" max="1280.0"/>
23+
<template type="tile" tref="https://geoappext.nrcan.gc.ca/arcgis/rest/services/BaseMaps/CBMT3978/MapServer/tile/{z00m}/{row}/{col}?m4h=t"/>
24+
<template type="tile" tref="http://maps.nofc.cfs.nrcan.gc.ca/geoserver/public/wms?service=WMS&amp;version=1.1.0&amp;request=GetMap&amp;layers=public:fdr_current&amp;styles=&amp;bbox={xmin},{ymin},{xmax},{ymax}&amp;width=256&amp;height=256&amp;srs=EPSG:3978&amp;FORMAT=image/png&amp;TRANSPARENT=TRUE&amp;m4h=t"/>
25+
</extent>
26+
</body>
27+
</mapml>

map-styles.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
.leaflet-image-loaded {
2323
visibility: inherit;
2424
}
25+
.mapml-popup-overflow {
26+
overflow: auto;
27+
}
2528
.leaflet-pane,
2629
.leaflet-tile,
2730
.leaflet-marker-icon,

0 commit comments

Comments
 (0)