├── .gitattributes ├── .gitignore ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE.md ├── README.md ├── resources └── tcrs.pptx ├── schema ├── README.md ├── geojson2mapml-default-table.rnc ├── geojson2mapml-default-table.rng ├── mapml-document.xml ├── mapml-viewer.rnc ├── mapml-viewer.sch ├── mapml-viewer.xhtml ├── mapml.rnc └── mapml.sch ├── spec ├── cuts ├── examples │ ├── cbmt.mapml │ ├── map-1.html │ ├── map-2.html │ └── mapml.png └── index.html └── w3c.json /.gitattributes: -------------------------------------------------------------------------------- 1 | # Set the default behavior, in case people don't have core.autocrlf set. 2 | * text=auto 3 | 4 | # Denote all files that are truly binary and should not be modified. 5 | *.png binary 6 | *.jpg binary -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | nbproject/private/private.properties 2 | nbproject/project.properties 3 | nbproject/project.xml 4 | nbproject/private/private.xml 5 | /schema/mapml_validation.xpr 6 | /nbproject/private/ -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Code of Conduct 2 | 3 | All documentation, code and communication under this repository are covered by the [W3C Code of Ethics and Professional Conduct](https://www.w3.org/Consortium/cepc/). 4 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to MapML 2 | 3 | This repository is being used for work in the [W3C Maps For HTML Community Group](http://www.w3.org/community/maps4html/), governed by the [W3C Community License Agreement (CLA)](http://www.w3.org/community/about/agreements/cla/). To make substantive contributions, you must join the CG. 4 | 5 | If you are not the sole contributor to a contribution (pull request), please identify all 6 | contributors in the pull request comment. 7 | 8 | To add a contributor (other than yourself, that's automatic), mark them one per line as follows: 9 | 10 | ``` 11 | +@github_username 12 | ``` 13 | 14 | If you added a contributor by mistake, you can remove them in a comment with: 15 | 16 | ``` 17 | -@github_username 18 | ``` 19 | 20 | If you are making a pull request on behalf of someone else but you had no part in designing the 21 | feature, you can remove yourself with the above syntax. 22 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | All Reports in this Repository are licensed by Contributors 2 | under the 3 | [W3C Software and Document License](http://www.w3.org/Consortium/Legal/2015/copyright-software-and-document). 4 | Contributions to Specifications are made under the 5 | [W3C CLA](https://www.w3.org/community/about/agreements/cla/). 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MapML [![Join the chat at https://gitter.im/Maps4HTML/MapML](https://badges.gitter.im/Maps4HTML/MapML.svg)](https://gitter.im/Maps4HTML/MapML?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) 2 | 3 | [Map Markup Language](https://maps4html.org/MapML-Specification/spec/) is hypertext for Web maps, like HTML is hypertext for Web pages. See the [explainer](https://github.com/Maps4HTML/MapML-Proposal) document. 4 | 5 | ## Background 6 | 7 | Maps on the Web have evolved significantly over the years. Yet in all that time, maps and the mapping community have not become significant contributors to the Web standards community. There are many reasons for this, but it is possible that one major cause is due to the lack of a common Web format for maps. 8 | 9 | MapML aims to be a simple format which strictly relies on existing Web standards and best practices with special emphasis on URLs and simple hypertext for state transitions, and standard styling techniques. The objective is to enable the convergence of modern Web mapping into the main stream of Web standards, to the mutual benefit of both the web and mapping communities. 10 | 11 | ## Maps for HTML Community Group 12 | 13 | MapML is being developed by the W3C [Maps for HTML Community Group](https://www.w3.org/community/maps4html/). Membership in that group is encouraged, however you do not have to join to use the information found here. However, if you wish to contribute, please join the Maps for HTML Community Group, and help us make the Web a map-friendly platform for everyone, everywhere! 14 | -------------------------------------------------------------------------------- /resources/tcrs.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maps4HTML/MapML-Specification/e903384d23237eb1efbe819720e2630a8054f7b2/resources/tcrs.pptx -------------------------------------------------------------------------------- /schema/README.md: -------------------------------------------------------------------------------- 1 | # MapML 2 | 3 | [Map Markup Language](https://maps4html.org/MapML-Specification/spec/) is a proposed HTML vocabulary for maps. 4 | Although document validity is not a concept that can be strictly enforced on the internet, 5 | the documents in this directory are an attempt to provide guidance to map authors on what 6 | constitutes markup that is understood as being within scope of the MapML specification. 7 | 8 | In principle, a MapML document should be parseable the HTML parser, because 9 | many of the elements are extended from the HTML namespace and are intended to have 10 | identical processing semantics to their counterpart in HTML apart from extensions specified in MapML. 11 | 12 | In practice, no such MapML/HTML parser exists at the time of writing, and it should be good enough to encode 13 | a MapML document in HTML5 XML syntax in the XHTML namespace, so that Web browsers' 14 | XML parsers can be used. When such a parser is used, it should be possible to use 15 | the schema / schematron documents in this directory to validate certain 16 | rules of MapML and XHTML documents. The schemas / schematron files in this directory are intended to 17 | evolve as the concept of MapML evolves. 18 | 19 | ## Instructions 20 | 21 | mapml.rnc (a [RelaxNG](http://www.relaxng.org/compact-tutorial-20030326.html) compact syntax schema) 22 | and mapml.sch (post-schema validation MapML schematron rules) are intended to be 23 | applied in that order, to validate a "stand-alone" MapML document. Such a document 24 | would be loaded into an HTML document by the custom element, via a URL 25 | reference in the src attribute: ``. 26 | 27 | Another scenario that is conceptually supported is to have an (X)HTML document that 28 | contains a element that contains one or more elements that 29 | in turn contain 'inline' MapML content, i.e. MapML vocabulary elements contained 30 | within the begin and end tags. 31 | 32 | I couldn't get a version of an rnc schema for xhtml to work, so I have to be satisfied 33 | with validating a document that contains only a `` element, with the 34 | correct namespace xmlns value for XHTML. See mapml-viewer.xhtml as an example. 35 | 36 | To validate this latter type of document, I 'forked' the mapml.rnc document into 37 | mapml-viewer.rnc. You can validate mapml-viewer.xhtml and similar documents by 38 | using the mapml-viewer.rnc schema validation phase, followed by the mapml-viewer.sch 39 | schematron validation. These scenarios may not be perfectly adapted; please get 40 | in touch if you have a document that doesn't validate, but you think it should, 41 | or vice versa. 42 | 43 | I use the Oxygen XML editor to create a global validation scenario for MapML documents, 44 | but you can use any engines which support those technologies, I believe. 45 | 46 | PR 47 | 48 | -------------------------------------------------------------------------------- /schema/geojson2mapml-default-table.rnc: -------------------------------------------------------------------------------- 1 | default namespace = "http://www.w3.org/1999/xhtml" 2 | namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" 3 | 4 | start = 5 | element table { 6 | element thead { 7 | element tr { 8 | element th { 9 | attribute role { 10 | ## The value of the role attribute is set to "columnheader", 11 | ## designating the meaning of contained cell text ("Property name") 12 | ## as a column header value 13 | text 14 | }, 15 | attribute scope { 16 | ## The value of the scope attribute is set to "col", 17 | ## designating that what is contained in corresponding table cells 18 | ## as a column value of the "Property name" column. 19 | text 20 | }, 21 | ## The en value of this th is set to "Property name". 22 | ## This string shall be localized to the locale of the user agent. 23 | text 24 | }, 25 | element th { 26 | attribute role { 27 | ## The value of the role attribute is set to "columnheader", 28 | ## designating the meaning of contained table text 29 | ## as a column header value 30 | text 31 | }, 32 | attribute scope { 33 | ## The value of the scope attribute is set to "col", 34 | ## designating that what is contained is a column value. 35 | text 36 | }, 37 | ## The en value of this th is set to "Property value". 38 | ## This string shall be localized to the locale of the user agent. 39 | text 40 | } 41 | } 42 | }, 43 | element tbody { 44 | element tr { 45 | element th { 46 | attribute scope { 47 | ## The value of the scope attribute is set to "row", 48 | ## designating this as a table data row 49 | text 50 | }, 51 | ## The text value of this cell is set to the properties' 52 | ## property member name from the input Feature 53 | text 54 | }, 55 | element td { 56 | attribute itemprop { 57 | ## The text value of the itemprop attribute is set to the 58 | ## properties' property member name from the input Feature 59 | text 60 | }, 61 | ## The text value of this cell is set to the value of the GeoJSON 62 | ## properties' property member from the input Feature 63 | text 64 | } 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /schema/geojson2mapml-default-table.rng: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | The value of the role attribute is set to "columnheader", designating the meaning of contained cell text ("Property name") as a column header value 13 | The value of the scope attribute is set to "col", designating that what is contained in corresponding table cells as a column value of the "Property name" column. 14 | 15 | The en value of this th is set to "Property name". This string shall be localized to the locale of the user agent. 16 | 17 | 18 | 19 | The value of the role attribute is set to "columnheader", designating the meaning of contained table text as a column header value 20 | The value of the scope attribute is set to "col", designating that what is contained is a column value. 21 | 22 | The en value of this th is set to "Property value". This string shall be localized to the locale of the user agent. 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | The value of the scope attribute is set to "row", designating this as a table data row 32 | 33 | The text value of this cell is set to the properties' property member name from the input Feature 34 | 35 | 36 | 37 | 38 | The text value of the itemprop attribute is set to the properties' property member name from the input Feature 39 | 40 | The text value of this cell is set to the value of the GeoJSON properties' property member from the input Feature 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /schema/mapml-document.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Canada Base Map - Geometry 5 | 6 | 7 | 8 | 9 | 11 | 14 | 15 | 16 | 17 | 18 | 20 | 22 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /schema/mapml-viewer.rnc: -------------------------------------------------------------------------------- 1 | datatypes xsd = "http://www.w3.org/2001/XMLSchema-datatypes" 2 | default namespace = "http://www.w3.org/1999/xhtml" 3 | start = mapml-viewer 4 | mapml-viewer = element mapml-viewer { map-layer*, 5 | attribute lat {text}, 6 | attribute lon {text}, 7 | attribute zoom {text}, 8 | attribute projection { "OSMTILE" | "CBMTILE" | "APSTILE" | "WGS84" }, 9 | attribute controls {text}?, 10 | attribute controlslist { text }?, 11 | attribute height {text}?, 12 | attribute width {text}?, 13 | attribute static {text}?, 14 | map-caption?, 15 | map-layer* 16 | } 17 | map-caption = element map-caption { text } 18 | map-layer = element map-layer { 19 | attribute src { xsd:anyURI }?, 20 | attribute label {text}?, 21 | attribute checked {text}?, 22 | attribute hidden {text}?, 23 | attribute opacity {text}?, 24 | (headContent?, bodyContent+) 25 | }* 26 | map-link = element map-link { 27 | attribute href { xsd:anyURI }?, 28 | # can have a tref (when in extent) or an href (but not both) 29 | attribute tref { text }?, 30 | # @rel=alternate + @projection=tcrs-name is proposed as a way of negotiating the tcrs of the service: https://github.com/Maps4HTML/MapML/issues/11 31 | attribute rel { text }, 32 | attribute projection { "OSMTILE" | "CBMTILE" | "APSTILE" | "WGS84" }?, 33 | attribute title { text }?, 34 | attribute type { text }?, 35 | attribute hreflang { text }? 36 | } 37 | map-links = map-link* 38 | headContent = 39 | element map-base { 40 | attribute href {text} 41 | }? & 42 | element map-meta { 43 | attribute name {text}?, 44 | attribute charset {text}?, 45 | attribute content {text}?, 46 | attribute http-equiv {text}? 47 | }* & 48 | element map-style { text }? & 49 | element map-title { text }? & 50 | map-links 51 | bodyContent = map-extent? & map-links & (map-feature | map-tile | map-image)* 52 | map-extent = element map-extent { 53 | attribute units { "OSMTILE" | "CBMTILE" | "APSTILE" | "WGS84" }?, 54 | (map-inputs* & map-links* & select* & label*)? 55 | } 56 | map-inputs = (element map-input { 57 | attribute name { text }, 58 | # xmin, ymin, xmax, ymax and projection are deprecated. If you need to transmit a projection, use a hidden input/variable 59 | # for xmin etc, use a input@type=location with appropriate position, units, axis values. 60 | attribute type { "zoom" | "hidden" | "location" | "datetime" | "width" | "height" }, 61 | attribute value { text }?, 62 | attribute rel { "image" | "tile" | "pixel" }?, 63 | attribute shard { text }?, 64 | attribute list { text }?, 65 | # position tokens are based on /composed from the set of keywords used for CSS object-position, but they are obviously unique tokesn and not combinable otherwise 66 | # https://developer.mozilla.org/en-US/docs/Web/CSS/object-position 67 | attribute position { "top-left" | "top-right" | "bottom-left" | "bottom-right" | "center-left" | "center-right" | "top-center" | "bottom-center" | "center" }?, 68 | attribute axis { "latitude" | "longitude" | "easting" | "northing" | "x" | "y" | "row" | "column" | "i" | "j" }?, 69 | attribute units {"gcrs" | "pcrs" | "tcrs" | "map" | "tilematrix" | "tile" }?, 70 | attribute required { xsd:boolean }?, 71 | attribute min { xsd:double }?, 72 | attribute max { xsd:double }?, 73 | attribute step { text }? 74 | }) 75 | label = element map-label { 76 | attribute for { text }, 77 | text 78 | } 79 | select = element map-select { 80 | attribute id { text }, 81 | attribute name { text }, 82 | option+ 83 | } 84 | option = element map-option { 85 | attribute value { text }?, 86 | attribute label { text }?, 87 | text 88 | } 89 | map-feature = element map-feature { 90 | attribute id { text }?, 91 | attribute class { text }?, 92 | attribute zoom { text }?, 93 | attribute min { text }?, 94 | attribute max { text }?, 95 | (map-geometry? & map-properties? & map-featurecaption?) 96 | } 97 | map-tile = element map-tile { 98 | attribute col { xsd:integer }, 99 | attribute row { xsd:integer }, 100 | ImageResourceMetadataAttributes 101 | } 102 | bbox = element map-bbox { twoPositions } 103 | map-image = element map-image { ImageModel } 104 | 105 | map-geometry = element map-geometry { 106 | attribute cs { "gcrs" | "pcrs" | "tcrs" | "map" | "tilematrix" | "tile" }?, 107 | (GeometryContent | map-a) 108 | } 109 | map-properties = element map-properties { PropertyContent } 110 | map-featurecaption = element map-featurecaption { text? } 111 | 112 | ImageResourceMetadataAttributes = 113 | attribute src { text }, 114 | imageLocation?, 115 | imageSize?, 116 | attribute angle { xsd:double }?, 117 | attribute type { text }? 118 | ImageModel = ImageResourceMetadataAttributes 119 | # allow any property/value via simple elements with allowed text content 120 | # see https://www.oreilly.com/library/view/xml-pocket-reference/9780596100506/re92.html 121 | PropertyContent = any_element 122 | any_element = element * { (attribute * { text } | text | any_element)* } 123 | any_attribute = attribute * { text } 124 | imageLocation = attribute x { xsd:double }, attribute y { xsd:double } 125 | imageSize = attribute width { xsd:integer },attribute height { xsd:integer } 126 | 127 | GeometryContent = map-point | map-linestring | map-polygon | map-multipoint | map-multilinestring | map-multipolygon | map-geometrycollection 128 | map-a = element map-a { 129 | attribute href { text }, 130 | attribute target { "_self" | "_top" | "_blank" | "_parent" }?, 131 | attribute type { "text/mapml" | "text/html" }?, 132 | (GeometryContent | text | span_element | coordinates_mixed)} 133 | map-point = element map-point { map-a | coordinates_mixed } 134 | map-linestring = element map-linestring { map-a | coordinates_mixed } 135 | map-polygon = element map-polygon { map-a* & coordinates_mixed+ } 136 | map-multipoint = element map-multipoint { map-a | coordinates_mixed } 137 | map-multilinestring = element map-multilinestring { map-a* & coordinates_mixed+ } 138 | map-multipolygon = element map-multipolygon { map-a* & map-polygon+ } 139 | map-geometrycollection = element map-geometrycollection { 140 | (map-point* & map-linestring* & map-polygon* & map-multipoint* & map-multilinestring* & map-multipolygon*) 141 | } 142 | span_element = element map-span { 143 | mixed { 144 | attribute * { text }*& 145 | span_element* & 146 | map-a* 147 | } 148 | } 149 | coordinates_mixed = element map-coordinates { mixed { span_element* & map-a* } } 150 | # for bbox content, omits coordinates element 151 | twoPositions = list { (xsd:double, xsd:double, xsd:double, xsd:double) } 152 | 153 | -------------------------------------------------------------------------------- /schema/mapml-viewer.sch: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | The map-layer element must be a child of the mapml-viewer element 8 | The <map-layer> element must have either a src attribute or inline content 9 | 10 | 11 | In the case that a label attribute exists and a map-title element is present, the map-title will be preferred. 12 | 13 | 14 | The map-layer element MUST have a trailing hyphen: map-layer 15 | 16 | 17 | 18 | 19 | 21 | The mapml-viewer element must have the projection, lat, lon and zoom attributes 22 | The projection attribute must have a value that is one of: 'OSMTILE','CBMTILE','WGS84' or 'APSTILE' 23 | The value of lat attribute must be a number 24 | The value of lon attribute must be a number 25 | The value of zoom attribute must be an integer between 0 and 26 26 | lon attribute must be greater than or equal to -180 and less than or equal to 180 27 | lat attribute must be greater than or equal to -90 and less than or equal to 90 28 | controlslist value must be one or more of ('nolayer','nozoom','noreload','nofullscreen','noscale','geolocation') 29 | 30 | 31 | -------------------------------------------------------------------------------- /schema/mapml-viewer.xhtml: -------------------------------------------------------------------------------- 1 | 3 | 4 | A pleasing map of Canada 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 |
code1200020
accuracy26
valdate1995
image 28 | 31 | 32 |
themeFO
type2
elevation61
altiaccu5
51 |
52 | 53 | 54 | -75.705278 45.397778 55 | 56 | 57 |
58 |
59 |
60 | -------------------------------------------------------------------------------- /schema/mapml.rnc: -------------------------------------------------------------------------------- 1 | datatypes xsd = "http://www.w3.org/2001/XMLSchema-datatypes" 2 | default namespace = "http://www.w3.org/1999/xhtml" 3 | start = mapml 4 | mapml = element mapml- { map-head?, attribute lang {text}?, body } 5 | map-head = element map-head { headContent } 6 | map-link = element map-link { 7 | attribute href { xsd:anyURI }?, 8 | # can have a tref (when in extent) or an href (but not both) 9 | attribute tref { text }?, 10 | # @rel=alternate + @projection=tcrs-name is proposed as a way of negotiating the tcrs of the service: https://github.com/Maps4HTML/MapML/issues/11 11 | attribute rel { text }, 12 | attribute projection { "OSMTILE" | "CBMTILE" | "APSTILE" | "WGS84" }?, 13 | attribute title { text }?, 14 | attribute type { text }?, 15 | attribute hreflang { text }? 16 | } 17 | map-links = map-link* 18 | headContent = 19 | element map-base { 20 | attribute href {text} 21 | }? & 22 | element map-meta { 23 | attribute name {text}?, 24 | attribute charset {text}?, 25 | attribute content {text}?, 26 | attribute http-equiv {text}? 27 | }* & 28 | element map-style { text }? & 29 | element map-title { text }? & 30 | map-links 31 | 32 | body = element map-body { bodyContent } 33 | bodyContent = map-extent? & map-links & (map-feature | map-tile | map-image)* 34 | map-extent = element map-extent { 35 | attribute units { "OSMTILE" | "CBMTILE" | "APSTILE" | "WGS84" }?, 36 | (map-inputs* & map-links* & select* & label*)? 37 | } 38 | map-inputs = (element map-input { 39 | attribute name { text }, 40 | # xmin, ymin, xmax, ymax and projection are deprecated. If you need to transmit a projection, use a hidden input/variable 41 | # for xmin etc, use a input@type=location with appropriate position, units, axis values. 42 | attribute type { "zoom" | "hidden" | "location" | "datetime" | "width" | "height" }, 43 | attribute value { text }?, 44 | attribute rel { "image" | "tile" | "pixel" }?, 45 | attribute shard { text }?, 46 | attribute list { text }?, 47 | # position tokens are based on /composed from the set of keywords used for CSS object-position, but they are obviously unique tokesn and not combinable otherwise 48 | # https://developer.mozilla.org/en-US/docs/Web/CSS/object-position 49 | attribute position { "top-left" | "top-right" | "bottom-left" | "bottom-right" | "center-left" | "center-right" | "top-center" | "bottom-center" | "center" }?, 50 | attribute axis { "latitude" | "longitude" | "easting" | "northing" | "x" | "y" | "row" | "column" | "i" | "j" }?, 51 | attribute units {"gcrs" | "pcrs" | "tcrs" | "map" | "tilematrix" | "tile" }?, 52 | attribute required { xsd:boolean }?, 53 | attribute min { xsd:double }?, 54 | attribute max { xsd:double }?, 55 | attribute step { text }? 56 | }) 57 | label = element map-label { 58 | attribute for { text }, 59 | text 60 | } 61 | select = element map-select { 62 | attribute id { text }, 63 | attribute name { text }, 64 | option+ 65 | } 66 | option = element map-option { 67 | attribute value { text }?, 68 | attribute label { text }?, 69 | text 70 | } 71 | map-feature = element map-feature { 72 | attribute id { text }?, 73 | attribute class { text }?, 74 | attribute zoom { text }?, 75 | attribute min { text }?, 76 | attribute max { text }?, 77 | (map-geometry? & map-properties? & map-featurecaption?) 78 | } 79 | map-tile = element map-tile { 80 | attribute col { xsd:integer }, 81 | attribute row { xsd:integer }, 82 | ImageResourceMetadataAttributes 83 | } 84 | bbox = element map-bbox { twoPositions } 85 | map-image = element map-image { ImageModel } 86 | 87 | map-geometry = element map-geometry { 88 | attribute cs { "gcrs" | "pcrs" | "tcrs" | "map" | "tilematrix" | "tile" }?, 89 | (GeometryContent | map-a) 90 | } 91 | map-properties = element map-properties { PropertyContent } 92 | map-featurecaption = element map-featurecaption { text? } 93 | 94 | ImageResourceMetadataAttributes = 95 | attribute src { text }, 96 | imageLocation?, 97 | imageSize?, 98 | attribute angle { xsd:double }?, 99 | attribute type { text }? 100 | ImageModel = ImageResourceMetadataAttributes 101 | # allow any property/value via simple elements with allowed text content 102 | # see https://www.oreilly.com/library/view/xml-pocket-reference/9780596100506/re92.html 103 | PropertyContent = any_element 104 | any_element = element * { (attribute * { text } | text | any_element)* } 105 | any_attribute = attribute * { text } 106 | imageLocation = attribute x { xsd:double }, attribute y { xsd:double } 107 | imageSize = attribute width { xsd:integer },attribute height { xsd:integer } 108 | 109 | GeometryContent = map-point | map-linestring | map-polygon | map-multipoint | map-multilinestring | map-multipolygon | map-geometrycollection 110 | map-a = element map-a { 111 | attribute href { text }, 112 | attribute target { "_self" | "_top" | "_blank" | "_parent" }?, 113 | attribute type { "text/mapml" | "text/html" }?, 114 | (GeometryContent | text | span_element | coordinates_mixed)} 115 | map-point = element map-point { map-a | coordinates_mixed } 116 | map-linestring = element map-linestring { map-a | coordinates_mixed } 117 | map-polygon = element map-polygon { map-a* & coordinates_mixed+ } 118 | map-multipoint = element map-multipoint { map-a | coordinates_mixed } 119 | map-multilinestring = element map-multilinestring { map-a* & coordinates_mixed+ } 120 | map-multipolygon = element map-multipolygon { map-a* & map-polygon+ } 121 | map-geometrycollection = element map-geometrycollection { 122 | (map-point* & map-linestring* & map-polygon* & map-multipoint* & map-multilinestring* & map-multipolygon*) 123 | } 124 | span_element = element map-span { 125 | mixed { 126 | attribute * { text }*& 127 | span_element* & 128 | map-a* 129 | } 130 | } 131 | coordinates_mixed = element map-coordinates { mixed { span_element* & map-a* } } 132 | # for bbox content, omits coordinates element 133 | twoPositions = list { (xsd:double, xsd:double, xsd:double, xsd:double) } 134 | -------------------------------------------------------------------------------- /schema/mapml.sch: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | For inputs[@type=location], @rel must equal 'map' or not exist 8 | 9 | 10 | For map-inputs[@type=location][units=map] @axis must exist and be equal to either i or j 11 | 12 | 13 | Easting axis reference must have paired northing axis reference 14 | 15 | 16 | Northing axis reference must have paired easting axis reference 17 | 18 | 19 | Extent must have a zoom input 20 | location inputs with axis=i or j must come in pairs 21 | location inputs with axis=easting or northing must come in pairs 22 | location inputs with axis=latitude or longitude must come in pairs 23 | location inputs with axis=row or column must come in pairs 24 | location inputs with axis=x or y must come in pairs 25 | 26 | 27 | 28 | 29 | map-meta name attribute value must be 'projection', 'cs', or 'extent' 30 | map-meta name attribute value must be 'projection', 'cs', or 'extent' 31 | 32 | 33 | 34 | 35 | Extent Content model: A set of multiple input and one or more link elements with their rel attribute in either the "tile", "image" or "features" state, and zero or one link element with its rel attribute in the "query" state. 36 | 37 | 38 | 39 | 40 | Links in head should have a href attribute (head links should not be templated). 41 | Links in head should not have a tref attribute (head links should not be templated). 42 | 43 | Unrecognized link@rel value (for head link): . Recognized rel values are: 44 | 45 | 46 | 47 | Unrecognized map-link@type value (for head link): . Recognized types are: 48 | 49 | 50 | projection links must be rel="alternate" 51 | If alternate projections are provided, the @type must be 'text/mapml', or be unspecified 52 | 53 | Unrecognized link@projection value: 54 | 55 | 56 | Links in extent should have a tref attribute (extent links must be templated). 57 | Links in extent should not have a href attribute (extent links must be templated). 58 | 59 | Unrecognized link@rel value (for templated link): . Recognized rel values are: 60 | 61 | 62 | 63 | Unrecognized map-link@type value (for templated map-link): . Recognized types are: 64 | 65 | 66 | Duplicate input/@name detected 67 | 68 | 69 | @min > @max detected 70 | 71 | 72 | templated links can only be in the extent element 73 | 74 | 75 | 76 | Alternate projection links can only be in the head element 77 | 78 | 79 | regular links must not be in the extent element 80 | 81 | 82 | More than one self style or style self link found 83 | 84 | 85 | 86 | 87 | A label must have a @for attribute 88 | 89 | A label must be associated to another element by label@for == element@id 90 | 91 | 92 | 93 | 94 | 95 | There must be only one label per labelled (select) element. Duplicated label for id="". 96 | 97 | 98 | 99 | 100 | 101 | Coordinates must be a sequence of number pairs 102 | Coordinates must all be numeric 103 | 104 | 105 | 106 | 107 | 108 | A polygon's coordinates must be a sequence of three or more pairs of numbers 109 | 110 | 111 | A polygon's coordinates must close 112 | 113 | 114 | 115 | 116 | 117 | 118 | A linestring's coordinates must be a sequence of two or more pairs of numbers 119 | 120 | 121 | 122 | 123 | 124 | A multipoint's coordinates should be a sequence of two or more pairs of numbers. Should you use a point, instead? 125 | 126 | 127 | 128 | 129 | 130 | A span in coordinates should wrap coordinate pairs. 131 | 132 | 133 | 134 | -------------------------------------------------------------------------------- /spec/cuts: -------------------------------------------------------------------------------- 1 | from section id=abstract 2 | 13 | 14 | from section id=sotd 15 | 16 | 38 | 39 | from section id=use cases and requirements 40 | 41 | 139 | 140 | -------------------------------------------------------------------------------- /spec/examples/cbmt.mapml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Canada Base Map - Transportation 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /spec/examples/map-1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Authoring example 1 7 | 8 | 9 | 35 | 44 | 45 | 46 | 47 | Paris, the City of Lights 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /spec/examples/map-2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Authoring example 2 7 | 8 | 9 | 35 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /spec/examples/mapml.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Maps4HTML/MapML-Specification/e903384d23237eb1efbe819720e2630a8054f7b2/spec/examples/mapml.png -------------------------------------------------------------------------------- /w3c.json: -------------------------------------------------------------------------------- 1 | { 2 | "group": 70543, 3 | "contacts": ["prushforth"], 4 | "repo-type": "cg-report" 5 | } 6 | --------------------------------------------------------------------------------