Svelte Mapbox screenshot

Svelte Mapbox

Author Avatar Theme by Beyonk group
Updated: 11 Nov 2024
366 Stars

MapBox Map and Autocomplete components for Svelte (or Vanilla JS)

Categories

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:

  1. Copy the .env file to .env.local.
  2. Populate the .env.local file with your MapBox key.
  3. Run the command npm run dev to 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.