Android Question Osmdroid - polygon,line, Point - Help please!

deyvitm

Member
Licensed User
Longtime User
  1. 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 resultsPolygon, 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.
  • I had forgotten, look at this bill in web services.
  1. [{"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,​
 
Top