Vector-Tiles-Google-Maps icon indicating copy to clipboard operation
Vector-Tiles-Google-Maps copied to clipboard

Add dependency framework, build process, tests, and other reworks

Open swilliams-northpointkc opened this issue 3 years ago • 0 comments

Hello,

We at NorthPoint Development recent forked this project for use in an internal project, as we needed a good library for rendering vector tiles to our Google Maps application. During the implementation we made a number of changes we'd like to share in this PR.

At a high level:

  • Changes the project architecture to use ES6 modules, add npm for dependency management, and import the pbf and @mapbox/vector-tile dependencies.
  • Adds jest for unit testing and adds a number of unit tests to avoid regressions in MVTFeature, MVTLayer, and MVTSource.
  • Adds ESLint for code linting, along with standard config.
  • Adds a new build process leveraging vite: relevant code and packages are minified and written to vector-tiles-google-maps/dist when npm run build is executed.
  • Adds JSDoc types and extended documentation.
  • Adds logic to load the Google Maps API key from local storage instead of hardcoding to each example page, and shortcuts to all examples from index.html.
  • Removes some Visual Studio boilerplate files that were not being used.

We would be happy to answer any questions you have about these changes!

swilliams-northpointkc avatar Mar 07 '23 18:03 swilliams-northpointkc