Android Question OSM PathOverlay disapears with zoom

DactilPlus

Member
Licensed User
Longtime User
I am using PathOverlay with OSM but the line disapears when I do big zoom.

Anybody nows how can I solve it?

Thanks a lot.
 

warwound

Expert
Licensed User
Longtime User
Are you using version 3.0.8 of OSMDroid?
There was a known bug with the PathOverlay in that version, look here:
https://code.google.com/archive/p/osmdroid/issues/392

The bug was never fixed in version 3.0.8, and i'm not sure if the bug was fixed in version 4.1.
If you are currently using version 3.0.8 and want to try version 4.1 then you'll find the library files here:
 
Upvote 0

DactilPlus

Member
Licensed User
Longtime User
Thanks for your reply warwound and eurojam.

You are right Warwound, I was using 3.0.8 .

Now its OK a lot of thanks
 
Last edited:
Upvote 0

DactilPlus

Member
Licensed User
Longtime User
Now with the new version I can´t change the maps

I used
B4X:
TileSourceSpinner.AddAll(MapView1.GetTileSources)

Now it dont works. Where can i find more examples of this version 4.1?

The problem is that now i can´t change the map and I need more zoom.
 
Last edited:
Upvote 0

warwound

Expert
Licensed User
Longtime User
Try this:

B4X:
Dim TileSourceNames As List
TileSourceNames.Initialize

Dim TileSourceFactory1 As OSMDroid_TileSourceFactory
Dim TileSources As OSMDroid_TileSource=TileSourceFactory1.GetTileSources

For Each TileSource1 As OSMDroid_TileSource In TileSources
	Log(TileSource1.Name)
	TileSourceNames.Add(TileSource1.Name)
Next

TileSourceSpinner.AddAll(TileSourceNames)
 
Upvote 0

DactilPlus

Member
Licensed User
Longtime User
Thanks warwound but this dont works.

It gives me this error:

B4X:
Dim TileSources As OSMDroid_TileSource=TileSourceF
javac 1.8.0_73
src\uk\co\martinpearman\b4a\osmdroiddemo\main.java:462: error: incompatible types: TileSource[] cannot be converted to TileSource
_tilesources = (uk.co.martinpearman.b4a.osmdroid.osmdroid.tileprovider.TileSource)(_tilesourcefactory1.GetTileSources());

and this one

B4X:
For Each TileSource1 As OSMDroid_TileSource In Til
javac 1.8.0_73
src\uk\co\martinpearman\b4a\osmdroiddemo\main.java:466: error: incompatible types: TileSource cannot be converted to IterableList
final anywheresoftware.b4a.BA.IterableList group25 = _tilesources;

and the program goes out when I try to change the map.
B4X:
MapView1.SetTileSource(value)






 
Last edited:
Upvote 0

deyvitm

Member
Licensed User
Longtime User
  1. Dear Martin, I am new to this tool and I am working as OSMDROID_3_0_8 (version 3.60) and I'm reading a webservice that returns data in plain text (json) having 3 kinds when they return Polygon, Point Line and in some cases:

    But the results returned are enough, even one of them weighs 10 mg and is enough and when I run from my cell phone application crashes and closes, I'm worried about this, then I need three types of aid:

    1: What is the best way to read a webservice that returns json ?, save data to a file and then read offline map Local ?, use?

    2: As I can do to reduce the resolution of these polygon, point or line coming from the webservice, to lower the time is fast and not the application to crash, not if can be cut from point to point, not .. hope your help please.

    3: How can I paint on the map these types of results Polygon, point and line properly and with good practice to keep my application to fail or data is not painted.

    If you could send me an example of this point I will thank you very much.

    Right where we are developing work and I have stayed at this without knowing what to do.

  2. I had forgotten, look at this bill in web services


    [{"datoDepa":"CIUDAD 1","cod":"20","geometria":"{\"type\":\"Polygon\",\"coordinates\":[[[-80.485521489,-4.08442772199992],
    [-80.484025364,-4.08540234699991],[-80.4832461139999,-4.08601559699994],
    [-80.482533239,-4.08687697199997],[-80.481949239,-4.08773634699994],
    [-80.4813359889999,-4.08866997199991],[-80.481158239,-4.08924222199992],
    [-80.481128864,-4.09010159699997],[-80.4816621139999,-4.09134372199998],
    [-80.4819453639999,-4.09212497199997],[-80.4819453639999,-4.09308197199992],
    [-80.4815742389999,-4.09430072199995],[-80.4805253639999,-4.09507222199993],
    [-80.4799121139999,-4.09531834699995],[-80.4790351139999,-4.09546097199994],
    [-80.478466739,-4.09577934699999],[-80.4777226139999,-4.09624234699993],
    [-80.477318364,-4.09668947199998],[-80.477103489,-4.09732809699997],
    [-80.477011739,-4.09808772199994],[-80.476693364,-4.09908197199996],
    [-80.476699239,-4.10002734699993],[-80.476033239,-4.10226372199996],
    [-80.475011739,-4.103837847],[-80.473650364,-4.1050507219999],
    [-80.471996114,-4.10626359699998],
    [-80.469421864,-4.10854684699998],[-80.467867239,-4.11022259699999]..........

    {"datoDepa":"CIUDAD 2","cod":"20","geometria":"{\"type\":\"Polygon\",\"coordinates\":[[[-80.485521489,-4.08442772199992],
    [-80.484025364,-4.08540234699991],[-80.4832461139999,-4.08601559699994],
    [-80.482533239,-4.08687697199997],[-80.481949239,-4.08773634699994],
    [-80.4813359889999,-4.08866997199991],[-80.481158239,-4.08924222199992],
    [-80.481128864,-4.09010159699997],[-80.4816621139999,-4.09134372199998],
    [-80.4819453639999,-4.09212497199997],[-80.4819453639999,-4.09308197199992],
    [-80.4815742389999,-4.09430072199995],[-80.4805253639999,-4.09507222199993],
    [-80.4799121139999,-4.09531834699995],[-80.4790351139999,-4.09546097199994],
    [-80.478466739,-4.09577934699999],[-80.4777226139999,-4.09624234699993],
    [-80.477318364,-4.09668947199998],[-80.477103489,-4.09732809699997],
    [-80.477011739,-4.09808772199994],[-80.476693364,-4.09908197199996],
    [-80.476699239,-4.10002734699993],[-80.476033239,-4.10226372199996],
    [-80.475011739,-4.103837847],[-80.473650364,-4.1050507219999],
    [-80.471996114,-4.10626359699998],
    [-80.4694218 64, -4.10854684699998],[-80.467867239,-4.11022259699999]..........

    [{"cubigeo":"12","vtambo":"CIUDAD A",
    "vestado":"Valor ABC",
    "vestado_ogei":"ABC",
    "geometria":"{\"type\":\"Point\",\"coordinates\":[-78.6679253627937,-7.15790922531741]}"},
    {"cubigeo":"13","vtambo":"CIUDAD B","vestado":Valor ABC 1","vestado_ogei":"ABC 1","geometria":"{\"type\":\"Point\",\"coordinates\":[-79.4897831134275,-5.0996083483677]}"},
    {"cubigeo":"14","vtambo":"CIUDAD C","vestado":"Valor ABC 2","vestado_ogei":"ABC 2","geometria":"{\"type\":\"Point\",\"coordinates\":[-73.1514704826526,-3.44189147184756]}"},
    {"cubigeo":"15","vtambo":"CIUDAD D","vestado":"Valor ABC 3","vestado_ogei":"ABC 3","geometria":"{\"type\":\"Point\",\"coordinates\":[-72.9140391074263,-13.6207694813221]}"},
    {"cubigeo":"16","vtambo":"CIUDAD E","vestado":"Valor ABC 4","vestado_ogei":"ABC 4","geometria":"{\"type\":\"Point\",\"coordinates\":[-69.2467499785579,-16.5912109838752]}"},......
    .........
    .........

    Saludos,​
 
Last edited:
Upvote 0

deyvitm

Member
Licensed User
Longtime User
martin estimated,
a thousand apologies for disturbing, but I want to help me please com osmdroid, it is very urgent for me
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…