Spectre Active Member Licensed User Longtime User Apr 17, 2014 #1 Hi! o you think you can implement these bees to use this service to geo location? http://www.insta-mapper.com/api-guide/ Best regards...
Hi! o you think you can implement these bees to use this service to geo location? http://www.insta-mapper.com/api-guide/ Best regards...
Erel B4X founder Staff member Licensed User Longtime User Apr 17, 2014 #2 It should be quite simple to use this API with HttpUtils2. Upvote 0
Spectre Active Member Licensed User Longtime User Apr 18, 2014 #3 Erel said: It should be quite simple to use this API with HttpUtils2. Click to expand... Hi Erel... I guess it returns invalid caracter ... devas manage downloading2? Code: Copy Dim job1 As HttpJob job1.Initialize("Job1", Me) job1.Download("http://ww2.insta-mapper.com/api/api_multi.php?key=<11111111>&device_id=<11111111>") Upvote 0
Erel said: It should be quite simple to use this API with HttpUtils2. Click to expand... Hi Erel... I guess it returns invalid caracter ... devas manage downloading2? Code: Copy Dim job1 As HttpJob job1.Initialize("Job1", Me) job1.Download("http://ww2.insta-mapper.com/api/api_multi.php?key=<11111111>&device_id=<11111111>")
Erel B4X founder Staff member Licensed User Longtime User Apr 18, 2014 #4 1. You should remove the < and > characters (they only appear in their documentation to show you where you should insert the values). 2. It is better to use Download2: Code: Copy job1.Download2("http://ww2.insta-mapper.com/api/api_multi.php", Array As String("key", "11111111", "device_id", "111111")) Upvote 0
1. You should remove the < and > characters (they only appear in their documentation to show you where you should insert the values). 2. It is better to use Download2: Code: Copy job1.Download2("http://ww2.insta-mapper.com/api/api_multi.php", Array As String("key", "11111111", "device_id", "111111"))
Spectre Active Member Licensed User Longtime User Apr 18, 2014 #5 Erel said: 1. You should remove the < and > characters (they only appear in their documentation to show you where you should insert the values). 2. It is better to use Download2: Code: Copy job1.Download2("http://ww2.insta-mapper.com/api/api_multi.php", Array As String("key", "11111111", "device_id", "111111")) Click to expand... Hi Thank ... you characters I had already removed, it works with download ... but I do not get anything in return jobdone (Job As HttpJob) Upvote 0
Erel said: 1. You should remove the < and > characters (they only appear in their documentation to show you where you should insert the values). 2. It is better to use Download2: Code: Copy job1.Download2("http://ww2.insta-mapper.com/api/api_multi.php", Array As String("key", "11111111", "device_id", "111111")) Click to expand... Hi Thank ... you characters I had already removed, it works with download ... but I do not get anything in return jobdone (Job As HttpJob)
DonManfred Expert Licensed User Longtime User Apr 18, 2014 #6 I´ve just created an insta-mapper account and have few minutes gps-tracking running... I´ve created a small test-project. But it works ... ;-) Code: Copy Sub Activity_Create(FirstTime As Boolean) 'Do not forget to load the layout file created with the visual designer. For example: 'Activity.LoadLayout("Layout1") Dim job As HttpJob job.Initialize("insta", Me) job.Download("http://ww2.insta-mapper.com/api/api_multi.php?key=12345&device_id=67890") End Sub Sub JobDone(job As HttpJob) If job.Success Then If job.JobName = "insta" Then Dim parser As JSONParser parser.Initialize(job.GetString2("utf-8")) Dim root As List = parser.NextArray Dim markers As Int = 0 For Each colroot As Map In root markers = markers +1 Dim minutes As String = colroot.Get("minutes") Dim speed As String = colroot.Get("speed") Dim altitude As String = colroot.Get("altitude") Dim battery As String = colroot.Get("battery") Dim device_id As String = colroot.Get("device_id") Dim lng As String = colroot.Get("lng") Dim friendly_name As String = colroot.Get("friendly_name") Dim accuracy As String = colroot.Get("accuracy") Dim kph As String = colroot.Get("kph") Dim heading As String = colroot.Get("heading") Dim lat As String = colroot.Get("lat") Dim Date As String = colroot.Get("Datetime") Next Log("Loaded "&markers&" markers...") End If Else Log("Error: "&job.ErrorMessage) End If job.Release End Sub Loaded 34 markers... Click to expand... I´m here Last edited: Apr 18, 2014 Upvote 0
I´ve just created an insta-mapper account and have few minutes gps-tracking running... I´ve created a small test-project. But it works ... ;-) Code: Copy Sub Activity_Create(FirstTime As Boolean) 'Do not forget to load the layout file created with the visual designer. For example: 'Activity.LoadLayout("Layout1") Dim job As HttpJob job.Initialize("insta", Me) job.Download("http://ww2.insta-mapper.com/api/api_multi.php?key=12345&device_id=67890") End Sub Sub JobDone(job As HttpJob) If job.Success Then If job.JobName = "insta" Then Dim parser As JSONParser parser.Initialize(job.GetString2("utf-8")) Dim root As List = parser.NextArray Dim markers As Int = 0 For Each colroot As Map In root markers = markers +1 Dim minutes As String = colroot.Get("minutes") Dim speed As String = colroot.Get("speed") Dim altitude As String = colroot.Get("altitude") Dim battery As String = colroot.Get("battery") Dim device_id As String = colroot.Get("device_id") Dim lng As String = colroot.Get("lng") Dim friendly_name As String = colroot.Get("friendly_name") Dim accuracy As String = colroot.Get("accuracy") Dim kph As String = colroot.Get("kph") Dim heading As String = colroot.Get("heading") Dim lat As String = colroot.Get("lat") Dim Date As String = colroot.Get("Datetime") Next Log("Loaded "&markers&" markers...") End If Else Log("Error: "&job.ErrorMessage) End If job.Release End Sub Loaded 34 markers... Click to expand... I´m here
Spectre Active Member Licensed User Longtime User Apr 18, 2014 #7 Hi!!!! Don... I had not used the library JSONParser and it was much more complex ... Upvote 0
DonManfred Expert Licensed User Longtime User Apr 18, 2014 #8 Erels JSON-Parser Onlinetool help you building the code to read the json... http://basic4ppc.com:51042/json/index.html Upvote 0
Erels JSON-Parser Onlinetool help you building the code to read the json... http://basic4ppc.com:51042/json/index.html