|
1 | | -<!DOCTYPE html> |
2 | | -<html> |
3 | | - <head> |
4 | | - <meta charset="utf-8" /> |
5 | | - <title><map> 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 | | -<!-- <img usemap="#dowslake" src="map1.png" width="700" height="400" alt="Dow's Lake area" />--> |
38 | | - <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="tile-cache-OSMTILE.mapml" 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 |
44 | | - <layer- id="marker" label="Marker layer" src="marker.mapml"></layer-> |
45 | | -
|
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> |
48 | | - <area is="map-area" id="marker2" href='http://example.com/marker/' alt="Marker" coords="265,185,265,185" shape="marker"> |
49 | | - <area is="map-area" id="line" href='http://example.com/line/' alt="Line" coords="275,275,540,107" shape="line"> |
50 | | -
|
51 | | - <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"> |
52 | | - <area is="map-area" id="hole" coords="250,250,7" shape="circle" style="fill: blue; stroke: none;fill-opacity: 0.3;"> |
53 | | - <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">--> |
55 | | - </map> |
56 | | - </div> |
57 | | - </body> |
58 | | -</html> |
| 1 | +<!DOCTYPE html> |
| 2 | +<html> |
| 3 | + <head> |
| 4 | + <meta charset="utf-8" /> |
| 5 | + <title><map> 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 | +<!-- <img usemap="#dowslake" src="map1.png" width="700" height="400" alt="Dow's Lake area" />--> |
| 38 | + <map is="web-map" zoom="17" lat="45.398043" lon="-75.70683" width="700" height="400" controls> |
| 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="https://geogratis.gc.ca/api/beta/vectors/canvec/50k/features/" class="transparency"></layer-> |
| 42 | + <!-- the HTML author can create MapML files and serve them as layers if they prefer --> |
| 43 | + <layer- id="marker" label="Marker layer" src="marker.mapml"></layer-> |
| 44 | + |
| 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>--> |
| 47 | +<!-- <area is="map-area" id="marker2" href='http://example.com/marker/' alt="Marker" coords="265,185,265,185" shape="marker"> |
| 48 | + <area is="map-area" id="line" href='http://example.com/line/' alt="Line" coords="275,275,540,107" shape="line"> |
| 49 | +
|
| 50 | + <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"> |
| 51 | + <area is="map-area" id="hole" coords="250,250,7" shape="circle" style="fill: blue; stroke: none;fill-opacity: 0.3;"> |
| 52 | + <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"> |
| 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">--> |
| 54 | + </map> |
| 55 | + </div> |
| 56 | + </body> |
| 57 | +</html> |
0 commit comments