I made this extension to make things easier to use OSM Maps features.
- add custom Marker (customize icon and size)
- add Circle ( with UserExitsCircle feature)
- add Polygon
- add Track
- add Maptiles (load .mbtiles for Offline Map use)
- add Image (load and fit an Image, for example a Photo of a historical Map
as an Overlay) - All features are clickable and this way easy to remove.
- note: Currently, you still need to add the AppInventor OSM Map
component and set it to invisible. Otherwise, the extension won't work.
Developed by Django 2025 using Fast.
Package: com.django.djmaps
Size: 156,14 KB
Version: 1.11
Minimum API Level: 26
Updated On: 2025-03-18T23:00:00Z
Built & documented using: FAST-CLI
v2.6.0
Demo Aia:
Events:
DjMaps has total 16 events.
Triggered when the map is ready.
Triggered when a MapTile is clicked.
Parameter | Type |
---|---|
maptileId | number |
title | text |
Triggered when a marker is created.
Parameter | Type |
---|---|
markerId | number |
latitude | number |
longitude | number |
Triggered when a marker is long clicked.
Parameter | Type |
---|---|
markerId | number |
title | text |
subtitle | text |
latitude | number |
longitude | number |
iconFileName | text |
Triggered when a marker is clicked.
Parameter | Type |
---|---|
markerId | number |
title | text |
subtitle | text |
latitude | number |
longitude | number |
iconFileName | text |
Triggered when a marker is dragged.
Parameter | Type |
---|---|
markerId | number |
latitude | number |
longitude | number |
Triggered when a polygon is clicked.
Parameter | Type |
---|---|
polygonId | number |
name | text |
latitude | number |
longitude | number |
Triggered when a polygon is long clicked.
Parameter | Type |
---|---|
polygonId | number |
name | text |
latitude | number |
longitude | number |
Triggered when user exits the tracked circle
Parameter | Type |
---|---|
circleId | number |
latitude | number |
longitude | number |
name | text |
radius | number |
Triggered when a circle is clicked.
Parameter | Type |
---|---|
circleId | number |
latitude | number |
longitude | number |
name | text |
radius | number |
Triggered when a circle is long clicked.
Parameter | Type |
---|---|
circleId | number |
latitude | number |
longitude | number |
name | text |
radius | number |
Triggered when a track (polyline) is clicked.
Parameter | Type |
---|---|
trackId | number |
name | text |
length | number |
Triggered when a track (polyline) is long clicked.
Parameter | Type |
---|---|
trackId | number |
name | text |
length | number |
Event triggered when the image overlay is clicked.
Parameter | Type |
---|---|
imageId | number |
title | text |
latitude | number |
longitude | number |
scale | number |
rotation | number |
filePath | text |
Triggered when the map zoom level changes
Parameter | Type |
---|---|
oldZoomLevel | number |
newZoomLevel | number |
Triggered when the map is long-pressed.
Parameter | Type |
---|---|
latitude | number |
longitude | number |
Methods:
DjMaps has total 20 methods.
Initialize or reinitialize the map in the specified arrangement
Parameter | Type |
---|---|
arrangement | component |
Request necessary permissions.
Load an image overlay at a specific latitude and longitude.
Parameter | Type |
---|---|
imagePath | text |
latitude | number |
longitude | number |
title | text |
Remove an image overlay from the map by its unique ID.
Parameter | Type |
---|---|
imageId | number |
Set the map type for the map view.
Parameter | Type |
---|---|
mapType | number |
Reset map rotation to north-up (0 degrees).
Remove all map overlays.
Load a .mbtiles file and display its tiles on the map with a given title.
Parameter | Type |
---|---|
title | text |
filePath | text |
Remove a specific MBTiles overlay from the map by its MaptileId.
Parameter | Type |
---|---|
maptileId | number |
Remove all MBTiles overlays from the map.
Add a marker to the map with a unique index.
Parameter | Type |
---|---|
latitude | number |
longitude | number |
title | text |
subtitle | text |
iconFileName | text |
color | text |
draggable | boolean |
iconSize | number |
Remove a marker from the map by its unique index.
Parameter | Type |
---|---|
markerId | number |
Add a polygon with nested coordinate lists.
Parameter | Type |
---|---|
coordinates | list |
name | text |
fillColor | number |
opacity | number |
strokeColor | number |
strokeWidth | number |
Remove a polygon from the map by its unique ID.
Parameter | Type |
---|---|
polygonId | number |
Add a circle to the map with configurable properties.
Parameter | Type |
---|---|
latitude | number |
longitude | number |
name | text |
radius | number |
strokeColor | number |
fillColor | number |
opacity | number |
Enable circle exit detection for a specific circle
Parameter | Type |
---|---|
latitude | number |
longitude | number |
enable | boolean |
circleId | number |
Remove a circle from the map by its unique ID.
Parameter | Type |
---|---|
circleId | number |
Add a track (polyline) with nested coordinate lists.
Parameter | Type |
---|---|
coordinates | list |
name | text |
color | number |
opacity | number |
width | number |
Remove a track from the map by its unique ID.
Parameter | Type |
---|---|
trackId | number |
Set the map's zoom level and center location.
Parameter | Type |
---|---|
latitude | number |
longitude | number |
zoomLevel | number |
Setters:
DjMaps has total 9 setter properties.
Set the opacity of the loaded image overlay.
- Input type:
number
Rotate the image overlay.
- Input type:
number
Scale the image overlay.
- Input type:
number
Enable or disable image editing mode.
- Input type:
boolean
Enable or disable the compass overlay.
- Input type:
boolean
Enable or disable the scale bar overlay
- Input type:
boolean
Enable or disable map rotation.
- Input type:
boolean
Enable or disable showing the user's position on the map.
- Input type:
boolean
Set the map's zoom level
- Input type:
number
Getters:
DjMaps has total 8 getter properties.
Get current zoom level
- Return type:
number
Get the current scale of the image overlay.
- Return type:
number
Get the list of all loaded Maptile IDs.
- Return type:
list
Get a list of all marker IDs currently on the map.
- Return type:
list
Get a list of all polygon IDs currently on the map.
- Return type:
list
Get a list of all circle IDs currently on the map.
- Return type:
list
Get a list of all image overlay IDs currently on the map.
- Return type:
list
Get a list of all track IDs currently on the map.
- Return type:
list
credits go to @Jewel for his filepicker extension I used in this demo aia
com.django.DjMaps.aix (155.7 KB)
MapExtTest4.aia (362.0 KB)
Since I have been working on this extension for several weeks, I would appreciate a small donation!