Skip to content
This repository has been archived by the owner on Nov 19, 2023. It is now read-only.

dorayakikun/waffle-map

Repository files navigation

waffle-map

Fantastic mesh renderer

Netlify Status Known Vulnerabilities tested with jest

Mesh code is a very useful project, but it is not intuitive. Waffle Map generates a mesh from the mesh code and render it on the map. I would be happy if we can help everyone understand the mesh code !!

Waffle Map

Contents

Usage

$ git clone https://github.com/dorayakikun/waffle-map.git
$ yarn
$ yarn start

Demo

Please See https://waffle-map.netlify.com/

Extending Waffle Map

first step

Prepare below modules

  • name: waffle-map-mesh-calculator-{your-logic-name}
  • functions:
    • toMeshCode: (lat: number, lng: number, scale: number) => string
    • toBounds: (meshCode: string) => Bounds
    • toCenterLatLng: (meshCode: string) => LatLng
    • scaleFrom(zoom: number): number
    • offset(meshCode: string, x: number, y: number): string
  • constant
    • SCALES: [number]

Please see here as sample code.

second step

Append wafflemap config in package.json.

"wafflemap": {
  "meshcalculator": "your-logic-name"
}

Author

  • dorayakikun