Download the PHP package pteal79/geo-map without Composer
On this page you can find all versions of the php package pteal79/geo-map. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download pteal79/geo-map
More information about pteal79/geo-map
Files in pteal79/geo-map
Package geo-map
Short Description A native map for NativePHP Mobile with coloured markers and shaded circles sized in metres (e.g. geofences). MapKit on iOS, MapLibre on Android, no API keys.
License MIT
Homepage https://github.com/pteal79/geo-map
Informations about the package geo-map
pteal79/geo-map
A native map for NativePHP Mobile with coloured markers and shaded circles sized in metres, for things like geofences. MapKit on iOS, MapLibre with OpenFreeMap tiles on Android. No API keys on either platform.
Installation
Add the provider to your app's NativeServiceProvider::plugins():
Then rebuild the app (php artisan native:run).
Usage
The native: prefix works too (<native:geo-map>).
<geo-map>
| Attribute | Default | Notes |
|---|---|---|
lat, lng |
none | Camera centre. Without them iOS frames the map's content and Android shows its default view. |
zoom |
15 |
Web-mercator zoom level. |
follow |
true |
Re-centre whenever lat/lng change. With false the camera is positioned once and the user's own pan and zoom are kept. |
interactive |
true |
Pan and pinch. |
show-user-location |
false |
The platform's own location dot. Needs location permission (skipped without it). |
The map is 280 points tall unless a height class is given.
<geo-map-circle>
| Attribute | Default | Notes |
|---|---|---|
lat, lng |
none | Centre. |
radius |
100 |
Metres on the ground, so the circle scales with zoom. |
fill-color |
#3B82F6 |
#RRGGBB. |
fill-opacity |
0.2 |
0 to 1. |
stroke-color |
the fill colour | #RRGGBB. |
stroke-width |
2 |
Points/dp; 0 for no outline. |
<geo-map-marker>
| Attribute | Default | Notes |
|---|---|---|
lat, lng |
none | Position. |
title |
'' |
Label (shown under the dot on iOS). |
color |
#EA4335 |
#RRGGBB. |
Markers and circles are read by the map as data and redrawn only when they change, so binding a marker to a live location fix just moves the dot.
Platform notes
- iOS 18.2+ (SwiftUI MapKit). Android API 26+ (MapLibre
org.maplibre.gl:android-sdk:11.11.0). - Android needs
INTERNETfor map tiles, which the plugin declares.
Testing
License
MIT