You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Convert a GeoJSON feature or feature collection string or object to MapML [`<layer->`](/web-map-doc/docs/layers/layer/) containing one or more [`<map-feature>`](/web-map-doc/docs/elements/feature/) elements. Returns and adds the converted layer element to the map.
333
+
Convert a GeoJSON feature or feature collection string or object to MapML [`<layer->`](/web-map-doc/docs/elements/layer/) containing one or more [`<map-feature>`](/web-map-doc/docs/elements/feature/) elements. Returns and adds the converted layer element to the map.
334
334
335
335
:::tip
336
336
@@ -351,11 +351,11 @@ Check out [this application](https://maps4html.org/experiments/api/custom-map-ui
351
351
352
352
| Option | Type | Default | Description |
353
353
|------|------|---------------|--------|
354
-
|`label`| <String\>|`json.name`, `json.title` or "Layer" | Sets the output layer's [label](/web-map-doc/docs/layers/layer/#label). |
354
+
|`label`| <String\>|`json.name`, `json.title` or "Layer" | Sets the output layer's [label](/web-map-doc/docs/elements/layer/#label). |
355
355
|`projection`| <String\>|`map`.[projection](/web-map-doc/docs/elements/mapml-viewer/#projection) or `OSMTILE`| Sets the output layer's [projection](/web-map-doc/docs/elements/mapml-viewer/#projection). Defined values include: `OSMTILE`, `CBMTILE`, `WGS84`, and `APSTILE`.|
356
356
|`caption`| <String \| Function\>|`json.features[i].id` or the `label` value | A function that accepts the feature JSON and returns a string, OR a string that is the name of a property to be mapped to the [featurecaption](/web-map-doc/docs/elements/feature/#map-featurecaption). If a matching property is not found, the string provided will be used as the feature caption value. See [basic options usage](#basic-options-usage) for an example. |
357
357
| <spanid="option-properties">`properties`</span> | <Function \| String \| HTMLElement\>|_Properties will be mapped to an HTML [table](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table)._| Specifies how the properties are mapped. <Function\>-Afunctionthatacceptsoneargument-theGeoJSONfeatureobject-andwhichmustreturnanHTMLElementthatbecomesthesinglechildelementofthe<properties\>element.<String\>-Astringthatwillbeparsedandusedasthesinglechildelementofthe`<properties>`elementforallfeatures.<HTMLElement\>-anelementthatwillbeusedasthesinglechildelementof`<properties>`elementforallfeatures.See[basicoptionsusage](#basic-options-usage)foranexample.|
358
-
|`geometryFunction`| <Function\>|_MapML geometry will mirror the GeoJSON geometry value_| <Function\>Afunctiontomodifythegenerated[descendants](/web-map-doc/docs/elements/geometry/#child-elements)of`<map-geometry>`whichcanaddclasses,[hyperlinks](/web-map-doc/docs/other-elements/map-a/)and[span's](/web-map-doc/docs/other-elements/span/)totheinstance.Plain`<map-geometry>`elementwillbecreatedbydefault.Thefunctionacceptstwoarguments:Thegenerated[childelement](/web-map-doc/docs/elements/geometry/#child-elements)of`<map-geometry>`andthe[featurejsonobject](https://www.rfc-editor.org/rfc/rfc7946#section-3.2)toreturnamodifiedchildelementofthe`<map-geometry>`element.See[basicoptionsusage](#basic-options-usage)foranexample.|
358
+
|`geometryFunction`| <Function\>|_MapML geometry will mirror the GeoJSON geometry value_| <Function\>Afunctiontomodifythegenerated[descendants](/web-map-doc/docs/elements/geometry/#child-elements)of`<map-geometry>`whichcanaddclasses,[hyperlinks](/web-map-doc/docs/elements/map-a/)and[span's](/web-map-doc/docs/elements/span/)totheinstance.Plain`<map-geometry>`elementwillbecreatedbydefault.Thefunctionacceptstwoarguments:Thegenerated[childelement](/web-map-doc/docs/elements/geometry/#child-elements)of`<map-geometry>`andthe[featurejsonobject](https://www.rfc-editor.org/rfc/rfc7946#section-3.2)toreturnamodifiedchildelementofthe`<map-geometry>`element.See[basicoptionsusage](#basic-options-usage)foranexample.|
Copy file name to clipboardExpand all lines: docs/elements/span.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
id: span
3
3
title: "<map-span>"
4
-
slug: /other-elements/span/
4
+
slug: /elements/span/
5
5
---
6
6
7
7
The `<map-span>` element is useful when used together with html global attributes such as [class](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/class). This element allows you to wrap the coordinate pairs in a `<map-coordinates>` element, allowing the wrapped coordinates to be targeted by CSS selectors, and thus independently styled.
Copy file name to clipboardExpand all lines: docs/elements/style.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ title: "<map-style>"
4
4
slug: /elements/style/
5
5
---
6
6
7
-
The `<map-style>` element allows map authors to embed CSS into map layers. The CSS can be used to style the geometry of the layer using [`<map-span>`](../../other-elements/span/), and by setting the class attribute to the [child elements](../geometry/#child-elements) of the geometry.
7
+
The `<map-style>` element allows map authors to embed CSS into map layers. The CSS can be used to style the geometry of the layer using [`<map-span>`](../../elements/span/), and by setting the class attribute to the [child elements](../geometry/#child-elements) of the geometry.
0 commit comments