React SDK
A professional React wrapper for Gebeta Maps' vector tiles, providing a comprehensive interface for creating interactive maps.
Overview
A professional React wrapper for Gebeta Maps, providing a comprehensive interface for creating interactive maps with markers, polylines, polygons, and clustering capabilities.
Key Features
-
Multiple Built-in Styles: Choose from various pre-designed map styles
-
Customizable Markers: Support for both color-based and image-based markers
-
Polylines: Draw routes and paths with custom styling options
-
Polyfill Support: Display areas with fill and outline customization options
-
Marker Clustering: Intelligent clustering with customizable appearance
-
Interactive Events: Handle marker clicks and map interactions
-
Map Click Event Handling: Capture and respond to map click events
-
TypeScript Support: Full TypeScript definitions included
Installation
Install the package using npm or yarn:
Prerequisites
Before you begin, you'll need:
- A Gebeta Maps API key - Register at Gebeta Maps to get your key
Quick Start
Here's a simple example to get you started:
Core Components
GebetaMap
The main map component that renders the interactive map.
Props:
apiKey- Your Gebeta Maps API keycenter- Initial map center coordinates[longitude, latitude]zoom- Initial zoom levelstyle- Map style name (e.g.,"gebeta_basic")
MapMarker
Add markers to your map with custom styling and interactions.
Props:
id- Unique identifier for the markerlngLat- Marker position[longitude, latitude]color- Marker color (hex code)onClick- Click event handler
| Platform | Supported |
|---|---|
| React | Yes |
| Next.js | Yes |
Resources
For comprehensive API reference, advanced examples, and detailed documentation: