Hi,
This b4Xlib contains a custom view (cvMap) which can display Open Street Map.
View attachment 108424
The tiles are retrieved from the internet and cached in a database. You can add markers on the map.
UI :
- Lat/lng Center of the map
- Zoom Level
- Compass Direction with rotation
- Scale
- Button Menu
- Grid
- Center
- GPS position and bearing
Event :
- ready
- Lat/lng changed
- Zoom Level Changed
- Compass Direction Changed
- Marker Clicked
- Map Clicked
- Center Lat/lng clicked
- Button Menu clicked
- Scale clicked
- Compass Clicked
- GPS Clicked
Dependencies :
- Core
- SQL
- OKHttpUtils2
- XUI
- XUI views
Other files in the b4xlib :
- coMapUtilities : code module with Types, functions, helpers
- clTileManager : standard class module to load tile from database and/or internet and save them into the database
- layout cvmap.bal and cvmap.bjl
- images for the compass and gps
How to use it :
- Just add the cvMap custom view with the designer
- create sub to handle events if necessary
- set options (lat/lng, zoom.....)
B4A example and B4J example included
spsp