Overview
The Svelte MapBoxjs-standard-style is a lightweight library that allows the creation of custom Svelte components on a MapBox map. It is SvelteKit and SSR ready, and does not have any client-side dependencies except for the GeoCoder component. The library provides reactive properties for center and zoom, as well as methods for interacting with the map.
Features
- SvelteKit Ready: The library is compatible with SvelteKit and can be easily integrated into SvelteKit projects.
- SSR Ready: The library supports Server-Side Rendering (SSR) and ensures a smooth user experience.
- Lightweight: The library is lightweight and does not add significant overhead to the bundle size.
- No clientside dependencies (Map): The library does not have any client-side dependencies for the map component.
- Allow creation of custom Svelte components on the map: The library provides the ability to create custom Svelte components that can be placed on the map.
Installation
To install the Svelte MapBoxjs-standard-style library, follow these steps:
- Copy the
.envfile to.env.local. - Populate the
.env.localfile with your MapBox key. - Run the command
npm run devto start the development server.
Summary
The Svelte MapBoxjs-standard-style library allows the creation of custom Svelte components on a MapBox map. It is lightweight, SvelteKit and SSR ready, and does not have any client-side dependencies for the map component. The library provides reactive properties for center and zoom, as well as methods for interacting with the map. Overall, it offers a seamless and customizable map experience for Svelte developers.