B4A Class Open Street Map viewer - GPS

irda

Member
Licensed User
Longtime User
Hi, great job.
There must be a possibility but I can't find it. Is it possible to change the symbol of the current position (looks like the on/off button) and reduce the size of the +/- buttons? Thank you.
 

spsp

Active Member
Licensed User
Longtime User
Hi, great job.
There must be a possibility but I can't find it. Is it possible to change the symbol of the current position (looks like the on/off button) and reduce the size of the +/- buttons? Thank you.
View attachment 129311
Hello,

Symbol for current position : change the image 'bearing.png'.
+/- buttons, change in the cvmap layout file.

spsp
 

Sergey_New

Well-Known Member
Licensed User
Longtime User
I get this picture in B4A:

What happened?
B4J in the map is displayed normally.
 

TILogistic

Expert
Licensed User
Longtime User
I get this picture in B4A:
View attachment 132529
What happened?
B4J in the map is displayed normally.
see:
 

Sergey_New

Well-Known Member
Licensed User
Longtime User
Thanks, I'll try.
P.S.
This advice helped, thanks!
 
Last edited:

Nkalampika

Active Member
Licensed User
Hello
 

petr4ppc

Well-Known Member
Licensed User
Longtime User

spsp

Active Member
Licensed User
Longtime User
Hi,

post #1, B4XMap.B4XLib updated with the methods userAgent and tileServer

spsp
 

petr4ppc

Well-Known Member
Licensed User
Longtime User
Dear spsp,

I maybe being stupid but I dont know what I am doing wrong, please for help.

I have downloaded B4XMap.B4XLib from post #1. I see, it is Version 2.

I declare:
B4X:
Private fcvMap As cvMap

in fcvMap I am trying to find userAgent and tileServer
because of words in post #1: "or with setter/getter from the cvmap : userAgent, tileServer"

Please, what I am doing wrong,
thank you very much,
best regards
p4ppc
 

spsp

Active Member
Licensed User
Longtime User
Hi,
userAgent and tileServer are 2 getter/setter of cvMap, so add this 2 lines in the fcvmap_ready sub

userAgent and tileServer:
private Sub fcvmap_ready
    fcvMap.TileServer="https://a.tile.openstreetmap.org/"
    fcvMap.UserAgent="User-AgentMozilla/5.0 (Windows NT 10.0; Win64; x64; rv:108.0) Gecko/20100101 Firefox/108.0"
    'set values
    fcvMap.Map=fMap
    'draw the map
    fcvMap.draw
End Sub

spsp
 

petr4ppc

Well-Known Member
Licensed User
Longtime User
Dear spsp,

I have same situation:


And in libraries I have:


EDIT: SPSP thank you very much, everything is OK. I tried to reinstal library again and now is everything perfect. The new library is Version 2 as previous library. I dont know where I did mistake, but now is everything perfect. Thank you for your time, Best regards , p4ppc
 
Last edited:

mw71

Active Member
Licensed User
Longtime User
Hi,

i have add 2 marker and a Line, works fine.
Now i search a way to move a Maker (to an other Lat/Lon Position)

ps: i used the Libary as Class
 

aminoacid

Active Member
Licensed User
Longtime User
Hi,

This b4Xlib contains a custom view (cvMap) which can display Open Street Map.

Hi! Nice work. Thanks!
Is there some reason why the jSQL library is included in the example but never used?
 

Lakhtin_V

Active Member
Licensed User
Longtime User
How should the code be redone so that the map is displayed based on a previously downloaded file with the OCM extension. I don't have internet access during the map rendering process and I want to use one locality OSM file that I downloaded earlier via export from mapsource main site
 

aminoacid

Active Member
Licensed User
Longtime User

I think the maps are being cached but I cannot figure out where in the code this happens. The jSQL Library is included in the project but I don't see anywhere it is used. Removing the library reference has no effect on the compilation so the maps are not being stored in an SQL DB for sure.

This is the reason why I posted my question (post #96) to @spsp
 

spsp

Active Member
Licensed User
Longtime User
Hi,

The tiles are retrieved from internet and stored in a sqlite database.
The module clMapTieManager.bas does the job.
spsp
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…