Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restructure a bit and add a couple of pages of documentation #10

Merged
merged 3 commits into from
Mar 23, 2021

Conversation

prushforth
Copy link
Member

Let me know if you have any comments, please, and thanks!


```html
<!DOCTYPE html>
<html>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add lang="en" to the HTML element.

<html>
<head>
<title>A Simple Web Map[tm]</title>
<meta charset="utf-8" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<meta charset="utf-8"> must exist in the first 1024 byte of a document, as such it is a best practice to specify it as the first element in <head>, and since people might copy and paste this we should adhere to that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also recommend setting <meta name="viewport" content="width=device-width, initial-scale=1">, as almost everybody is going to want to build a responsive page.

<title>A Simple Web Map[tm]</title>
<meta charset="utf-8" />
<script type="module" src="web-map/mapml-viewer.js"></script>
<style>html {height:100%} * {margin:0px;padding:0px} body,mapml-viewer {height:inherit}</style>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These styles aren't required, can we remove them?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally we'd encourage people to use the pre-styling styles to avoid layout shifts and FOUC, and the <noscript> styles if they want to use fallbacks. But maybe we should deal with that as a separate issue.


- `APSTILE` is based on the Alaska Polar Stereographic (EPSG:5936) projected coordinate reference system, and has 20 zoom levels (0 to 19).

- other projections are possible, using the "[Custom Projections](https://github.com/Maps4HTML/Web-Map-Custom-Element/pull/239/commits/e9a29e7abcc43d7f15eb64729920e2ad06fc25c5)" API
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


The web-map custom element suite provides a set of proof-of-concept "[customized built-in](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements)" elements based on `<map>`, `<area>` and `<img>` that will "fall back" to a client side image map in older browsers, or in the absence of JavaScript (scripting disabled).

Note that because not all modern Web browsers implement HTML's customized built-in elements, it is not recommended to use this proof-of-concept on a public Web site, as end-user confusion may be the result.
Copy link
Member

@Malvoz Malvoz Mar 17, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This document as a whole scares me 😅. Can we make this paragraph into an alert box, similar to the one at https://maps4html.org/web-map-doc/docs/layers/static-images/?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it's a sad story!

Copy link
Member

@ahmadayubi ahmadayubi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are good changes, it may be valuable to make the first few pages users interact with less intimidating by linking to text heavy content rather than keeping it inline but that's your decision to make. Also I know personally when looking at documentation the less content the better generally, as you tend to skim through things anyways but that might just be a personal preference.

@prushforth
Copy link
Member Author

These are good changes, it may be valuable to make the first few pages users interact with less intimidating by linking to text heavy content rather than keeping it inline but that's your decision to make. Also I know personally when looking at documentation the less content the better generally, as you tend to skim through things anyways but that might just be a personal preference.

No, I agree with these! That's why I asked for a review! 💯

@prushforth prushforth requested a review from Malvoz March 23, 2021 15:13
Copy link
Member

@Malvoz Malvoz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants