make packages for dart and npm
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
# Intaleq Maps JS SDK (`intaleq-maps-gl`)
|
||||
|
||||
A premium JavaScript/TypeScript SDK for the Intaleq Map Platform, built on top of MapLibre GL. Optimized for high-performance mapping in Jordan, Syria, and the broader region.
|
||||
|
||||
## Features
|
||||
|
||||
- **Simplified Geometry**: Use `addIntaleqMarker`, `addIntaleqPolyline`, `addIntaleqPolygon`, and `addIntaleqCircle` for rapid development.
|
||||
- **Intaleq Routing**: Integrated multi-profile routing API.
|
||||
- **Intaleq Geocoding**: High-performance place search and reverse geocoding.
|
||||
- **Branding-Ready**: Built-in Intaleq branding colors and premium map styles (Obsidian, Light, Satellite).
|
||||
- **Polyline decoding**: Built-in support for decoding server-side encoded routes.
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
npm install intaleq-maps-gl
|
||||
```
|
||||
|
||||
Or via CDN:
|
||||
|
||||
```html
|
||||
<script src="https://unpkg.com/intaleq-maps-gl/dist/index.js"></script>
|
||||
```
|
||||
|
||||
## Quick Start
|
||||
|
||||
### Initialize the Map
|
||||
|
||||
```javascript
|
||||
import { IntaleqMap } from 'intaleq-maps-gl';
|
||||
|
||||
const map = new IntaleqMap({
|
||||
container: 'map',
|
||||
apiKey: 'YOUR_INTALEQ_API_KEY',
|
||||
styleType: 'obsidian'
|
||||
});
|
||||
|
||||
map.on('load', () => {
|
||||
// Add a marker
|
||||
map.addIntaleqMarker({
|
||||
position: [36.2765, 33.5138], // [lng, lat]
|
||||
color: '#0D47A1'
|
||||
});
|
||||
});
|
||||
```
|
||||
|
||||
### Search for Places
|
||||
|
||||
```javascript
|
||||
const results = await map.search('Amman');
|
||||
console.log(results);
|
||||
```
|
||||
|
||||
### Get a Route
|
||||
|
||||
```javascript
|
||||
const route = await map.getRoute([36.2, 33.5], [36.3, 33.6]);
|
||||
map.addIntaleqPolyline({
|
||||
id: 'route-line',
|
||||
coordinates: route.geometry.coordinates
|
||||
});
|
||||
```
|
||||
|
||||
## Documentation
|
||||
|
||||
For full documentation and API reference, visit the [Intaleq Documentation](https://map-dashbord.intaleqapp.com/dashboard.html#docs).
|
||||
|
||||
## License
|
||||
|
||||
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
||||
Reference in New Issue
Block a user