Giter Site home page Giter Site logo

maplibre-gl-js-docs's Introduction

⚠️This repo is now archived⚠️

All the code related to the generation of the docs, that now resides in https://maplibre.org/maplibre-gl-js/docs can be found in the at the main repo.





MapLibre GL JS Documentation

The source code for https://maplibre.org/maplibre-gl-js-docs/, the website that hosts API documentation and examples for MapLibre GL JS. A GitHub Actions Workflow is triggered on push to the main branch. This Action builds the static website and deploys it to GitHub Pages by pushing to the gh-pages branch.

Requirements

  • Node 18
  • npm 9

If you're not sure if your Node and NPM versions are up to date, run nvm use before installing dependencies. If you don't have NVM installed, you can find installation instructions here.

The NPM scripts will not run on Windows, but work perfectly with WSL2.

Setting up the Development Environment

After cloning this repository, run:

npm ci # install dependencies with npm

Writing API Documentation

API documentation is written as JSDoc comments and processed with documentationjs in the source code of maplibre-gl-js. This repository fetches the source code through npm packages.

  • Classes, methods, events, and anything else in the public interface must be documented with JSDoc comments. Everything outside of the public interface may be documented and must be tagged as @private.
  • Text within JSDoc comments may use markdown formatting. Code identifiers must be surrounded by `backticks`.
  • Documentation must be written in grammatically correct sentences ending with periods.
  • Documentation must specify measurement units when applicable.
  • Documentation descriptions must contain more information than what is obvious from the identifier and JSDoc metadata.
  • Class descriptions should describe what the class is, or what its instances are. They do not document the constructor, but the class. They should begin with either a complete sentence or a phrase that would complete a sentence beginning with "A T is..." or "The T class is..." Examples: "Lists are ordered indexed dense collections." "A class used for asynchronous computations."
  • Function descriptions should begin with a third person singular present tense verb, as if completing a sentence beginning with "This function..." If the primary purpose of the function is to return a value, the description should begin with "Returns..." Examples: "Returns the layer with the specified id." "Sets the map's center point."
  • @param, @property, and @returns descriptions should be capitalized and end with a period. They should begin as if completing a sentence beginning with "This is..." or "This..."
  • Functions that do not return a value (return undefined), should not have a @returns annotation.
  • Member descriptions should document what a member represents or gets and sets. They should also indicate whether the member is read-only.
  • Event descriptions should begin with "Fired when..." and so should describe when the event fires. Event entries should clearly document any data passed to the handler, with a link to MDN documentation of native Event objects when applicable.

Writing Examples

Examples are written as Batfish pages in docs/pages/example. Each example requires two files: an .html file containing the source code for the example, and a .js file containing example boilerplate and front matter. The front matter should include the following items:

  • title: A short title for the example in sentence case as a verb phrase.
  • description: A one sentence description of the example in plain text. This description will appear alongside a thumbnail and title on the examples page.
  • topics: An array of topics for the example, see docs/data/topics.json for a list of topics.
  • thumbnail: The filename of the example's thumbnail image (without the file extension).
  • contentType: example: Set the contentType to equal example.

In content area of the markdown page include an extended description of the example and add links to documentation or other important resources where possible.

In the .html file, write the HTML and JavaScript constituting the example.

  • Do not include a MapTiler access token in the example code. The access token will be inserted automatically by the template, using the current logged in user's default public token, or a placeholder <insert token here> string if the user is not logged in.
  • On commit, Prettier will format the code for all files, including HTML.

Every example must have an accompanying image.

  1. Ensure that you have a build of the latest maplibre-gl-js in the neighboring directory (see below).
  2. Run npm run create-image <example-file-name>. The script will take a screenshot of the map in the example and save it to docs/img/src/. Commit the image.
  3. Run npm start to verify that your example image is loading as expected.

For some examples, npm run create-image does not generate an ideal image. In these cases, you can interact with the map after running the command before the screenshot is taken, or take a screenshot yourself by running the site locally with npm start, take a screenshot and save it in the docs/img/src folder.

To regenerate all images, run npm run create-image all. Note that this doesn't support interaction and examples that require manual interaction (e.g. popups) will need to be manually redone afterward. This feature is experimental and may crash before sucessfully generating all examples.

Running the Documentation Server Locally

To start a documentation server locally, run:

npm start

The command will print the URL you can use to view the documentation.

The examples section of the locally run documentation will use the GL JS version located in ../maplibre-gl-js/dist, so make sure to have a working minified build in your local copy of the maplibre-gl-js repo; clone maplibre-gl-js into the same directory as maplibre-gl-js-docs and run npm run build-dist there).

Committing and Publishing Documentation

When a new GL JS release goes out, the release manager will make a PR that updates this repo's maplibre-gl npm dependency to point to the new release. When updating the npm package, you may need to run npm test -- -u to update Jest snapshots related to the sidebar navigation.

To update or add a new example, PR the relevant changes to this repo. The example will be live once the PR is merged. If this example uses a version of GL JS that isn't yet released, the PR should not be merged until the release is out.

maplibre-gl-js-docs's People

Contributors

acalcutt avatar adrianababakanian avatar ahk avatar andrewharvey avatar ansis avatar astridx avatar bdon avatar birkskyum avatar danswick avatar dayjournal avatar dependabot[bot] avatar github-actions[bot] avatar harelm avatar heystenson avatar ka7eh avatar karimnaaji avatar katydecorah avatar kkaefer avatar life777 avatar malwoodsantoro avatar marcelnormann avatar marucjmar avatar maxammann avatar mourner avatar msbarry avatar roblabs avatar rowanwins avatar sgolbabaei avatar snailbones avatar wipfli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

maplibre-gl-js-docs's Issues

Broken link on `/maplibre-gl-js-docs/style-spec/` / Looking for style spec changelog

https://maplibre.org/maplibre-gl-js-docs/style-spec/ links to

<p>
<span class="inline-block mr6">Current version: <code>v18.0.1</code> </span>
<a class="unprose link txt-underline" href="https://github.com/maplibre/maplibre-gl-js/blob/main/src/style-spec/CHANGELOG.md">View changelog</a>
</p>

… but https://github.com/maplibre/maplibre-gl-js/blob/main/src/style-spec/CHANGELOG.md does not hold a changelog.

Is there a changelog for the style-spec? (That would be super helpful!)


Update: The link below https://github.com/maplibre/maplibre-gl-js/tree/main/src/style-spec "Contribute on GitHub" is also broken.

Setup of development environment locally fails

steps to follow

  • clone the repo
  • sun command npm ci

I;m getting following error

npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@mapbox/[email protected]',
npm WARN EBADENGINE   required: { node: '>=14', npm: '^7' },
npm WARN EBADENGINE   current: { node: 'v18.12.1', npm: '8.19.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@mapbox/[email protected]',
npm WARN EBADENGINE   required: { node: '>=14', npm: '^6.0.0' },
npm WARN EBADENGINE   current: { node: 'v18.12.1', npm: '8.19.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@mapbox/[email protected]',
npm WARN EBADENGINE   required: { node: '>=14', npm: '^7' },
npm WARN EBADENGINE   current: { node: 'v18.12.1', npm: '8.19.2' }
npm WARN EBADENGINE }
npm WARN deprecated [email protected]: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated [email protected]: optimize-js is an experiment, and probably unnecessary now. More details: https://v8.dev/blog/preparser#pife
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated [email protected]: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated [email protected]: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated @babel/[email protected]: 🚨 This package has been deprecated in favor of separate inclusion of a polyfill and regenerator-runtime (when needed). See the @babel/polyfill docs (https://babeljs.io/docs/en/babel-polyfill) for more information.
npm WARN deprecated [email protected]: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1
npm WARN deprecated [email protected]: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
npm WARN deprecated [email protected]: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.

added 2721 packages, and audited 2722 packages in 1m

409 packages are looking for funding
  run `npm fund` for details

41 vulnerabilities (19 moderate, 21 high, 1 critical)

To address issues that do not require attention, run:
  npm audit fix

To address all issues possible (including breaking changes), run:
  npm audit fix --force

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.


npm version - 8.19.2
node version - v18.12.1
OS - Mac (Intel)

Was this page helpful?

The docs pages have a feedback functionality which looks like this:

Should we remove it or implement our own MapLibre feedback form?

MapBox still being referenced

Use only the default mapbox account styles.

Sadly, I am unable (for now) to open a PR as I am unsure for what it should be changed. It also may require upstream changes as it may match current code.

TypeScript style spec files cannot be imported

With v15.0.0 of the style spec, the files are all in typescript whereas before the were in javascript. This produces the following error message when building the docs:

Error message: Module not found: Error: Can't resolve '@maplibre/maplibre-gl-style-spec/reference/latest' in '/home/runner/work/maplibre-gl-js-docs/maplibre-gl-js-docs/docs/data'

I wonder if I could transpile the style spec files to javascript or if I should look into converting the docs website to typescript?

Remove Mapbox specific code

There is a lot of Mapbox specific code left like

  • Tilestream URL
  • Mapbox URLs
  • Mapbox user menu
  • sniffing code like Raven & Sentry
    This needs to be removed

Failed to run "npm start"

Dear all,
I'am trying to run "npm start" on Windows 10 but it's failed as below picture.
image
Any suggestion on fixing this?
Thanks,

Typos in docs/data/api-navigation.js

Minor issue which came up as part of another discussion:

(I don't have time to fix these myself right now; leaving it here so it's not forgotten)

Add separate build workflow to validate latest version of maplibre-gl-js

The npm run test included the latest-version check which was problematic. It's not disabled, but splitting it out into a separate workflow would allow us to still run all other tests but that on versions that aren't the latest. This is valuable to test the doc generation of unreleased versions of the upstream code.

Broken GitHub links in API reference

Add example on who to use mapbox-gl-draw with Polygons

Motivation

Improve the example section to document as specific use case when using the map data to to selections or calculations that is not straight forward to solve.

UseCase:

  • Eg: The map is full of points; all points represent "1 something", we want to draw a Polygon on the map and calculate the sum of points selected (inside this Polygon)
  • Eg: The map shows us states; we want to draw a Polygon and only show those states below the Polygon as selected. Maybe calculate the sum of state size as well.
    This is the example used in charliedotau/mapbox-gl-js-select-features-by-draw#2

Possible Solution:

charliedotau/mapbox-gl-js-select-features-by-draw#2 shows the bits needed for a solution:

  • Use mapbox-gl-draw to draw an receive the Polygon
  • Use turf to create a bbox of that drawn polygon
  • Use queryRenderedFeatures to query the features of that polygon
  • Use turf to filter the features to those that are actually inside the polygon (booleanIntersects)
  • Change the styles and do the calculations

Stretch goal: Show how to persist the and initialize the Polygon as part of the URL by adding it to mapbox-gl-draw on load and persisting it in the URL with https://github.com/placemark/polyline.


This was first discussed in https://osmus.slack.com/archives/C01G3D28DAB/p1674637226422859?thread_ts=1674586300.777679&cid=C01G3D28DAB

Restrict dependabot to security updates

The docs website uses many packages and many of them lag a few major versions behind the latest available. I wonder if it makes sense to update the packages all the time or if we should rather restrict dependabot to security updates? After all, this repo is not a library, it is just a website...

What do you think @HarelM?

Migrate examples

adjust-layer-opacity.html uses custom layer mapbox.u8yyzaor
custom-style-id.html uses mapbox://styles/examples/cke97f49z5rlg19l310b7uu7j
dancing-buildings.html requires access to a custom mapbox studio style - its a really cool example however
data-driven-circle-colors.html requires access to a custom mapbox vector layer
data-join.html requires access to mapbox.country-boundaries-v1
filter-features-within-map-view.html uses custom layer mapbox.04w69w5j
hillshade.html requires access to mapbox.terrain-rgb
image-on-a-map.html define style in example with glyphs and sprite sources mapbox://sprites/mapbox/dark-v10
mapbox-gl-compare.html mapbox-gl-compare is incompatible with maplibregl
mapbox-gl-directions.html requires access to mapbox directions
playback-locations.html requires to mapbox boroughs layer mapbox.8ibmsn6u
queryrenderedfeatures-around-point.html requires access to mapbox countries layer mapbox.82pkq93d
query-similar-features.html requires access to custom mapbox countries layer mapbox.82pkq93d
setstyle.html uses different mapbox styles
style-ocean-depth-data.html uses custom layer mapbox.9tm8dx88
toggle-layers.html multiple custom layers
toggle-worldviews.html Error: The layer 'admin-0-boundary-disputed' does not exist in the map's style and cannot be filtered
updating-choropleth.html uses mapbox.660ui7x6 custom layer
using-box-queryrenderedfeatures.html uses custom layer mapbox.82pkq93d

Layers page does not work

I get error when I navigate to the "Layers" page in the documentation.

Something went wrong
We sent the error to the team. Please refresh the page to try again.

Error details
layer-background is not a valid image id

Allow setting a custom pixel ratio

We should not forget to document the new function setPixelRatio. I have tested it and copy my example here. At the moment they don't work in this repo because the function only exists in the development environment. Also, I have no idea how and where to put something like this in this documentation

Smaller value for the default of devicePixelRatio

Reducing the value has a positive effect on performanze. However, the quality of the display is also lower.

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <title>Quickstart MapLibre GL</title>
    <meta
      name="viewport"
      content="initial-scale=1,maximum-scale=1,user-scalable=no"
    />
    <script src=".env"></script>
    <script src="../maplibre-gl-js/dist/maplibre-gl-dev.js"></script>
    <link href="../maplibre-gl-js/dist/maplibre-gl.css" rel="stylesheet" />
  </head>

  <body>
    <div id="map1" style="width: 50vw; height: 20vh"></div>
    <hr />
    <div id="map2" style="width: 50vw; height: 20vh"></div>
    <span id="test"></span>

    <script>
      var map1 = new maplibregl.Map({
        container: "map1",
        style:
          "https://api.maptiler.com/maps/streets/style.json?key=" +
          config.MAPTILER_TOKEN,
        center: [7.72, 50.25],
        zoom: 12,
      });

      var map2 = new maplibregl.Map({
        container: "map2",
        style:
          "https://api.maptiler.com/maps/streets/style.json?key=" +
          config.MAPTILER_TOKEN,
          center: [7.72, 50.25],
        zoom: 12, 
      });
      map2.setPixelRatio(0.5);

      document.getElementById("test").innerHTML =
        "<b>Map 1</b> pixelRatio: " +
        map1.painter.pixelRatio +
        " width: " +
        map1.painter.width +
        " height: " +
        map1.painter.height +
        "<br><b>Map 2</b> pixelRatio: " +
        map2.painter.pixelRatio +
        " width: " +
        map2.painter.width +
        " height " +
        map2.painter.height;
    </script>
  </body>
</html>

1

Bigger value for the default of devicePixelRatio

If you need a certain quality (for a print), then it is possible with MapLibre to increase the value for devicePixelRatio.

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <title>Quickstart MapLibre GL</title>
    <meta
      name="viewport"
      content="initial-scale=1,maximum-scale=1,user-scalable=no"
    />
    <script src=".env"></script>
    <script src="../maplibre-gl-js/dist/maplibre-gl-dev.js"></script>
    <link href="../maplibre-gl-js/dist/maplibre-gl.css" rel="stylesheet" />
  </head>

  <body>
    <div id="map1" style="width: 50vw; height: 20vh"></div>
    <hr />
    <div id="map2" style="width: 50vw; height: 20vh"></div>
    <span id="test"></span>

    <script>
      var map1 = new maplibregl.Map({
        container: "map1",
        style:
          "https://api.maptiler.com/maps/streets/style.json?key=" +
          config.MAPTILER_TOKEN,
        center: [7.72, 50.25],
        zoom: 12,
      });

      var map2 = new maplibregl.Map({
        container: "map2",
        style:
          "https://api.maptiler.com/maps/streets/style.json?key=" +
          config.MAPTILER_TOKEN,
          center: [7.72, 50.25],
        zoom: 12, 
      });
      map2.setPixelRatio(2);

      document.getElementById("test").innerHTML =
        "<b>Map 1</b> pixelRatio: " +
        map1.painter.pixelRatio +
        " width: " +
        map1.painter.width +
        " height: " +
        map1.painter.height +
        "<br><b>Map 2</b> pixelRatio: " +
        map2.painter.pixelRatio +
        " width: " +
        map2.painter.width +
        " height " +
        map2.painter.height;
    </script>
  </body>
</html>

2

Too big value for the default of devicePixelRatio

Be aware that increasing the value for devicePixelRatio may result in the MapLibre map not being displayed correctly. The reason for this is that we cannot catch all possible problems. Different hardware and different software (operating system and browser) cause different processing (https://stackoverflow.com/questions/59510450/webgl-parameters-not-consistent-between-browsers).

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <title>Quickstart MapLibre GL</title>
    <meta
      name="viewport"
      content="initial-scale=1,maximum-scale=1,user-scalable=no"
    />
    <script src=".env"></script>
    <script src="../maplibre-gl-js/dist/maplibre-gl-dev.js"></script>
    <link href="../maplibre-gl-js/dist/maplibre-gl.css" rel="stylesheet" />
  </head>

  <body>
    <div id="map1" style="width: 50vw; height: 20vh"></div>
    <hr />
    <div id="map2" style="width: 50vw; height: 20vh"></div>
    <span id="test"></span>

    <script>
      var map1 = new maplibregl.Map({
        container: "map1",
        style:
          "https://api.maptiler.com/maps/streets/style.json?key=" +
          config.MAPTILER_TOKEN,
        center: [7.72, 50.25],
        zoom: 12,
      });

      var map2 = new maplibregl.Map({
        container: "map2",
        style:
          "https://api.maptiler.com/maps/streets/style.json?key=" +
          config.MAPTILER_TOKEN,
          center: [7.72, 50.25],
        zoom: 12, 
      });
      map2.setPixelRatio(16);

      document.getElementById("test").innerHTML =
        "<b>Map 1</b> pixelRatio: " +
        map1.painter.pixelRatio +
        " width: " +
        map1.painter.width +
        " height: " +
        map1.painter.height +
        "<br><b>Map 2</b> pixelRatio: " +
        map2.painter.pixelRatio +
        " width: " +
        map2.painter.width +
        " height " +
        map2.painter.height;
    </script>
  </body>
</html>

3

[Demo] Create an example to publish geo datasets on static hosts

Motivation

Various government agencies and organizations often need to publish geodata. Usually organizations need to use paid services to publish them, even though the datasets might be relatively small, or the number of downloads relatively low. I would like to propose a simple demo that would take all input geojson files and "compile" them into an easy to publish package that can be copy/pasted to a static hosting (like github pages) without any server component. The output will have:

  • a single pmtiles file with all the source geojson files
  • a simple maplibre-gl-js wrapper that shows that pmtile content to the users, loading data directly from the pmtiles (single static file via range requests), rather than using any kind of service
  • offer download links for the whole dataset (all geojson files zipped together)
  • offer a link to load each individual geojson file (each feature in pmtiles will have a tag that indicates what was the source geojson file for that feature)

Design Alternatives

Publish data to a paid service

Design

Packaging utility

A single packaging utility to

  • convert geojson into pmtiles, where each geojson is a separate feature with a link to the original geojson
  • copy all map-showing assets that know which pmtiles to use
  • some parameter to (optionally) use some base map, either from a tile service or some simple shapes like natural earth

MapLibre gl-js web site assets

All the assets needed to show the needed data to a user in a browser, automatically loading optional base map and the data overlay, plus allow feature clicking to show some statistics (shape size and bbox, etc), and a download link

Mock-Up

./publish --base https://example.org --geojson ./ --output ./build

Concepts

publish as part of the maplibre examples, showing the usage of pmtiles, on-click file downloads, ...

Implementation

i think the utility is better be done in Rust for speed and ease-of-deployment, while the web assets would be using maplibre-gl-js, possibly from some CDN

bottom control and Safari/iOS

maplibre-gl-js version: 2.1.9 (and any previous version)

browser: Chrome/Safari on iOS

The bottom navigation bar in Chrome/iOS cover bottom controls so they are unreachable, as shown in the above screenshot.

signal-2022-05-28-060038

The bottom navigation bar in Safari/iOS cover bottom controls so they are unreachable, as shown in the above screenshot.

signal-2022-05-28-060943

Expected behaviour (it works well on Chrome/MacOS):

Capture d’écran 2022-05-28 à 06 12 34

It would be nice to suggest a solution working also for Chrome/Safari on iOS

.eslintrc not found by `npm lint`

.eslintrc is not found by npm lint, because it searches for .eslintrc.* by default. I fixed it in 5fccff9 by adding it as a parameter to the eslint command. Maybe it woruld be more appropriate to rename the .eslintrc to .eslintrc.json so it will be found by default.

`url: mapbox://` still in docs

Code: https://github.com/maplibre/maplibre-gl-js-docs/blob/main/docs/pages/style-spec/sources.md?plain=1#L64-L74
Docs: https://maplibre.org/maplibre-gl-js-docs/style-spec/sources/#vector

The section below still references mapbox:// urls:

image

This code looks identical to the Mapbox docs. However, in the Mapbox docs the URL schema is still referenced in the in the url param section as well https://docs.mapbox.com/mapbox-gl-js/style-spec/sources/#vector-url – but not in the Maplibre Docs https://maplibre.org/maplibre-gl-js-docs/style-spec/sources/#vector-url.

IMO, ideally the docs should be updated with those information

  • update the example to how one would do this in maplibre without the mapbox-URL
  • hint in both sections (the code example and the url-section), that the mapbox-URL was removed in v.2.0.0. I guess the URL section would be maplibre/maplibre-gl-js@68732f0, but I am not sure.
  • provide some info to users how to migrate from mapbox-URLs or how to use mapbox tiles instead, via Maplibre (which is what I was initially looking for…)
    • This part could also be extended to the console error message Fetch API cannot load mapbox://lorem.123. URL scheme "mapbox" is not supported. which says what not to do but does not reference anything to solve the issue.

Move style-spec docs to dedicated repo

Similar to the task related to the style-spec subfolder in maplibre gl js (maplibre/maplibre-gl-js#2149), the style-spec docs should also be split from the MapLibre GL JS docs. This is because the style-spec will have a different release cycle from maplibre-gl-js, and because the docs for these two packages are generated very differently:

  • MapLibre GL JS is generated by parsing JSDoc comments
  • Style Spec is a JSON document, so the docs are made in a very custom fashion.

Completion criteria:

  • Make a clone of maplibre-gl-js-docs where everything but the style-spec code is removed.
  • Use the files from the style-spec repo directly rather than a submodule or an npm package. It might be necessary to expose tsc compiled .js files, since batfish isn’t ts compatible.
  • Deploy main branch with github pages to maplibre.org/maplibre-gl-style-spec
  • Setup github action on PRs to test that docs can build
  • Setup cloudflare redirect from old to new style-spec docs

Website isn't redirecting properly

Hi, was looking at the docs last week and today it doesn't work anymore. (https://maplibre.org/maplibre-gl-js-docs)

Firefox:

The page isn’t redirecting properly

An error occurred during a connection to maplibre.org.

    This problem can sometimes be caused by disabling or refusing to accept cookies.

Chrome;

This page isn’t workingmaplibre.org redirected you too many times.
[Try clearing your cookies](https://support.google.com/chrome?p=rl_error&hl=en-US).
ERR_TOO_MANY_REDIRECTS

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.