1 (edited by philzmz 2020-05-21 19:17:09)

Topic: Please help about displaying gpx on an OLMap

Hello again

I am trying to draw lines / import gpx files on an OLMap, I searched on the forum, in the tips, but didn’t find any help. Is there a tuto somewhere ?

In the Atlas of examples there is a “Using GPX” example, but I couldn't get it to work.

I either don’t understand how the PM action “Draw Line” works, it seems it uses coordinates, but I can’t enter anything in the field, nor a vector 2 variable ?

A PM Action Add GPX, with a variable being a text or csv file including the coordinates of all points would be great !

Best regards

Re: Please help about displaying gpx on an OLMap

Hello.

Online Maps does not have Playmaker actions for working with GPX.
You can only work with GPX using Online Maps API (C#).
GPX is a rather complicated format, which requires a lot of actions (it is quite possible as many as Online Maps has now), which is not rational due to its rare use.
You are the first and perhaps the only one who needs GPX and Playmaker together.

Please tell me in more detail what problems you have with this example.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

3 (edited by philzmz 2020-05-22 06:29:32)

Re: Please help about displaying gpx on an OLMap

Hello,
I understand that gpx (or kml) formats are complicated, with many possibilities.

My request is simpler : I just want to draw a path on an online map (for instance a hiking trail or the contour of a nature reserve), this path corresponding to a list of latitude/longitude coordinates, which is part of a gpx or kml file and can be easoly extracted. Maybe this could be achieved with the Draw Line PM action, but I don't understand how it works. It has to be a "projection" on the map, as if there are elevations a line could be under the map and thus not visible.

Re: Please help about displaying gpx on an OLMap

Please send me your GPX file, I will see what I can do for you.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Please help about displaying gpx on an OLMap

Of course I can send you a gpx file, but maybe I could try something by myself (and save your time) if you explain me how the OnlineMaps PlayMaker actions "draw line" and "Draw Poly" do work ?

There is a field with "coordinates" but I can't enter anything nor set it as a variable ?
Maybe I am wrong somewhere ?

Best regards

Re: Please help about displaying gpx on an OLMap

In these actions, you specify the coordinates of the polygon or line manually.
The difference between a polygon and a line is that the polygon is a closed shape, and the line is an open shape.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Please help about displaying gpx on an OLMap

Alex Vertax wrote:

In these actions, you specify the coordinates of the polygon or line manually.
The difference between a polygon and a line is that the polygon is a closed shape, and the line is an open shape.

Yes, of course :-) This was not my question, finally I could do it to work but there is sometimes a strange bug with this action.

So when it works, no problem for 3 or 4 points, but for a polygon or a line with hundreds of points (eg a hiking trail) it is really painfull, I have to cerate as many variables as there are points.

I think the best way - as i said in a previous post - could be to have only one variable which would be a very simple text (or csv) file including longitude - latitude for each point, like this for instance (here each pair Lat - Lng is separated by a space, but it could be a carriage return or semicolon :

43.1083725,3.09008560000007 43.1142355,3.09235490000003 43.1144649,3.09326239999996 43.1154892,3.09453289999999 43.1156423,3.09511750000001 43.1153433,3.09610999999995 43.1153675,3.097444 43.1155863,3.09985370000004 43.1158262,3.10085340000001 43.1161572,3.1016856 43.1164158,3.10322210000004 43.1174452,3.10375699999997 43.1178134,3.10409920000006 43.1183413,3.10409089999996 43.1189968,3.10351700000001 43.1196885,3.10259099999996 43.1201207,3.10183019999999 43.1206645,3.1011628 43.1208648,3.10142610000003 43.1201149,3.10264269999993 43.1196759,3.10351119999996 43.1191194,3.10448399999996 43.1194029,3.1048409 43.1200398,3.10529399999996 43.1203862,3.10554389999993 43.1210703,3.10567570000001 43.1218089,3.10603820000006 43.1219679,3.10579499999994 43.1224313,3.1053872 43.1231182,3.10513579999997 43.1236262,3.10477460000004 43.1238636,3.10454770000001 43.1241492,3.10387689999993 43.1243622,3.10392580000007 43.124562,3.10426570000004 43.1248631,3.10456109999996 43.1250341,3.10421070000007 43.1253718,3.10409249999998 43.1256295,3.10418800000002 43.1257809,3.10500260000003 43.1260604,3.10517500000003 43.1265751,3.10470599999996 43.1271401,3.10422289999997 43.1275922,3.10383030000003 43.1278781,3.1038499 43.1280834,3.10423549999996 43.128513,3.10457900000006 43.1288611,3.10458370000003 43.1294392,3.10383999999999 43.1297875,3.10382930000003 43.1304727,3.10454430000004 43.1309186,3.1050103 43.1314565,3.1051708 43.1320054,3.10620510000001 43.1324095,3.10696239999993 43.132855,3.10748969999997 43.1336427,3.10811309999997 43.1341969,3.10830510000005 43.1346809,3.10824920000005 43.1349041,3.10762399999999 43.134927,3.10672 43.1345176,3.10669870000004 43.1341449,3.10615749999999 43.1338178,3.10561589999998 43.1335437,3.10541339999997 43.1333158,3.10514910000006 43.1333916,3.1047059 43.1333557,3.10427559999994 43.1337346,3.10385180000003 43.134121,3.1040557 43.1344042,3.10444340000004 43.1348515,3.10472540000001 43.135184,3.10534319999999 43.1354328,3.10592880000002 43.1358043,3.10654769999996 43.1359995,3.10677980000003 43.1365455,3.10655759999997 43.1369306,3.10610270000006 43.1371522,3.10578310000005 43.137433,3.10494389999997 43.137662,3.10433349999994 43.1380024,3.10384729999998 43.1384117,3.1039902 43.1388119,3.10373530000004 43.1391323,3.10373909999998 43.139309,3.10331250000002 43.139364,3.10274530000004 43.1392931,3.10239219999994 43.1399279,3.10157240000001 43.1394576,3.10138210000002 43.1390315,3.10128450000002 43.1386689,3.10173970000005 43.1380627,3.10170100000005 43.1370526,3.1015956 43.137123,3.10201010000003 43.1366671,3.10211189999995 43.1365167,3.1019867 43.1364191,3.10223129999997 43.1358112,3.10243790000004 43.1354276,3.10267810000005 43.1348646,3.10288530000003 43.133179,3.10301630000004 43.1334095,3.10219129999996 43.1328064,3.10172320000004 43.1321814,3.10116289999996 43.1310425,3.1002277 43.1301496,3.09944919999998 43.1293901,3.09885639999993 43.128877,3.09835899999996 43.1285464,3.09746519999999 43.1281461,3.09690790000002 43.1280601,3.09635479999997 43.1278172,3.09576889999994 43.1278219,3.09509430000003 43.1274327,3.09465890000001 43.1271183,3.09465469999998 43.1268874,3.09468289999995 43.1264479,3.09415519999993 43.1261592,3.09369149999998 43.1256219,3.09343910000007 43.1252161,3.09364840000001 43.124676,3.09379460000002 43.124046,3.09393969999996 43.1232818,3.09402160000002 43.1228779,3.09395500000005 43.122319,3.09357969999996 43.121983,3.09345259999998 43.1216448,3.09363210000004 43.1213086,3.09353569999996 43.1209505,3.09334709999996 43.1206564,3.09364979999998 43.1203195,3.09364540000001 43.1202789,3.09376799999995 43.1204558,3.09416899999997 43.1207456,3.09447939999995 43.1209121,3.09475759999998 43.1208205,3.09500170000001 43.1210206,3.09529559999999 43.121286,3.09588170000006 43.1214383,3.09657360000006 43.1215678,3.09732659999997 43.1215727,3.09821590000001 43.1213486,3.09973070000001 43.1210699,3.1010149 43.1209671,3.10125879999998 43.1208536,3.10142599999995

Re: Please help about displaying gpx on an OLMap

Entering all points manually is painful and not effective, which is why I asked for your gpx.
Of course, I will not make all the actions for gpx, because it will be useless work.
But I can make one action for you that will read and display exactly your gpx.
For me it doesn't matter if it's gpx, xml, json, csv or txt.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

9 (edited by philzmz 2020-05-26 09:59:53)

Re: Please help about displaying gpx on an OLMap

Great, this is exactly what I was expecting !
The most simple and effective  is to consider a list of coordinates, the "cleaning process" being done upstream from a gpx, mkl or any other file.

Like this :
43.0876165;3.07243949999997
43.0878172;3.07265659999996
43.0879494;3.07302600000003
43.0882196;3.07293749999997
43.08858;3.07278889999998
43.0889609;3.07291639999994
43.0892732;3.07322679999993
...............

Or with space or tab between Lat/Lng, as you prefer.

So in the field of the PM action only the textfile name, right ?

Question : if elevations are on, the lines will follow the terrain, but if elevation are turned off, I will have to redraw the lines (and same thing from flat to 3DMap), right ?

A textfile is attached.

Post's attachments

Attachment icon coordinates.txt 4.98 kb, 98 downloads since 2020-05-26 

Re: Please help about displaying gpx on an OLMap

Something like that (attached).

Post's attachments

Attachment icon DrawTXT.cs 1.88 kb, 134 downloads since 2020-05-26 

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Please help about displaying gpx on an OLMap

Alex Vertax wrote:

Something like that (attached).

Perfect, works fine, thanks a lot !