Maps4HTML / web-map-doc

Documentation for Web-Map-Custom-Element https://maps4html.org/web-map-doc/
4 stars 10 forks source link

Sample Multiple Extents Example #68

Closed AliyanH closed 2 years ago

AliyanH commented 2 years ago

Sample 'Examples' heading added for the element to include additional examples for a element.

Open for discussions.

prushforth commented 2 years ago

Hi @AliyanH I like the structure of the example for multiple extents. I think it would be a good idea to add some prose about how to use the \<map-extent label="Nat Geo"...> attribute i.e. if you don't include the label attribute, the extent is "hidden" by default in the layer control. That's how / why when you only include a single \ element (usually you don't label it), it doesn't get its own entry in the layer control beneath the layer name i.e. here's the layer control entry for the Basemap layer in the example

image

and if I remove the label attribute for the "Nat Geo" extent thus: \<map-extent ...>, it becomes:

image

(but the user can no longer remove/re-order/check or otherwise change it).

Actually in looking at the full page, I realize that we need to add a description of the \<map-extent label...> attribute up in the attributes section, which was added as part of this feature, so maybe the discussion of the label attribute should go into its own section and your example can just include an in-code comment about a hidden extent that you hide by omitting its label attribute.

AliyanH commented 2 years ago

Yup that's a good point, Will add that!

prushforth commented 2 years ago

LGTM 👍