Svelte Pick A Place screenshot

Svelte Pick A Place

Author Avatar Theme by Jimutt
Updated: 30 Sep 2019
54 Stars

Javascript location picker built with Svelte

Overview

The Svelte component for position and area selection utilizing Leaflet is an innovative tool that allows users to interactively select geographical points or define areas directly on a map. This component is user-friendly and provides a seamless experience for integrating geographical data selection into Svelte applications. Whether you’re creating a mapping application or simply need to capture spatial information, this component simplifies the process with intuitive interactions.

With built-in handling for GeoJSON formats, this component emits events that give developers the flexibility to manage selected geometries effectively. The ability to draw polygons and select points makes it a versatile addition to any mapping solution.

Features

  • Interactive Map: Displays a Leaflet map where users can easily click to select positions or draw polygons for area selection.

  • GeoJSON Output: Emits selected geometries in GeoJSON format, making it easier to work with spatial data in various applications.

  • Customizable Properties: Allows setting properties such as latitude, longitude, and zoom level, providing tailored control over map presentation.

  • Flexible Selection Modes: Supports multiple selection modes, including point and polygon, to meet diverse user needs.

  • User Guidance: Includes a guide overlay that offers instructions on how to use the component, enhancing the user experience.

  • Event Emission: Features events like update and save, which help track user interactions and respond to selections appropriately.

  • Simple Integration: Designed to fill the parent container and easily integrates with existing Leaflet instances in Svelte apps.

  • Legacy Support: Offers an option for Internet Explorer 11 compatibility with a separate build, catering to a wider audience.