Start a new topic

Trying to load JSON data into Android Javascript SDK

I am pulling the data from https://opendata.arcgis.com/datasets/2bfd434d9263401eadae464a9c26104f_0.geojson


and when I replace the URL with a custom one that I have uploaded the above data to, the android device does not load any POI's. Should the JSON data be formatted in a specific way? I can't seem to find documentation on how the JSON data should be formatted if so. 


json.png
(7.14 KB)

Hi,


These Lat/long values seem to be in the middle of the Ocean. Did you make sure that you're using values that are around you? As the file above seems to look exactly like the sample .json file (as mentioned it doesn't have to be identical) you can easily test if you change the Lat/Long values to something in your surrounding if the POIs are displayed. I just did the same it seems to work for me.


Thx and greetings

Nicola

Hi Nicola,


I tried with the sample data that Wikitude provides through my web server, but it doesn't even load the sample data provided below. What requirements does my web server need to have in order to pull data?

[{"id":"1","longitude":"0.084","latitude":"0.065","description":"This is the description of POI#1","name":"POI#1"},{"id":"2","longitude":"-0.016","latitude":"0.013","description":"This is the description of POI#2","name":"POI#2"},{"id":"3","longitude":"0.015","latitude":"0.08","description":"This is the description of POI#3","name":"POI#3"},{"id":"4","longitude":"0.053","latitude":"-0.083","description":"This is the description of POI#4","name":"POI#4"},{"id":"5","longitude":"0.056","latitude":"-0.022","description":"This is the description of POI#5","name":"POI#5"},{"id":"6","longitude":"0.017","latitude":"-0.053","description":"This is the description of POI#6","name":"POI#6"},{"id":"7","longitude":"-0.055","latitude":"-0.031","description":"This is the description of POI#7","name":"POI#7"},{"id":"8","longitude":"0","latitude":"-0.003","description":"This is the description of POI#8","name":"POI#8"},{"id":"9","longitude":"0.07","latitude":"0.039","description":"This is the description of POI#9","name":"POI#9"},{"id":"10","longitude":"-0.079","latitude":"-0.011","description":"This is the description of POI#10","name":"POI#10"},{"id":"11","longitude":"0.01","latitude":"0.053","description":"This is the description of POI#11","name":"POI#11"},{"id":"12","longitude":"-0.029","latitude":"-0.021","description":"This is the description of POI#12","name":"POI#12"},{"id":"13","longitude":"0.052","latitude":"0.078","description":"This is the description of POI#13","name":"POI#13"},{"id":"14","longitude":"-0.002","latitude":"-0.015","description":"This is the description of POI#14","name":"POI#14"},{"id":"15","longitude":"-0.046","latitude":"-0.081","description":"This is the description of POI#15","name":"POI#15"},{"id":"16","longitude":"0.085","latitude":"-0.041","description":"This is the description of POI#16","name":"POI#16"},{"id":"17","longitude":"0.072","latitude":"-0.063","description":"This is the description of POI#17","name":"POI#17"},{"id":"18","longitude":"-0.083","latitude":"-0.032","description":"This is the description of POI#18","name":"POI#18"},{"id":"19","longitude":"-0.014","latitude":"-0.013","description":"This is the description of POI#19","name":"POI#19"},{"id":"20","longitude":"0.065","latitude":"0.07","description":"This is the description of POI#20","name":"POI#20"},{"id":"21","longitude":"-0.083","latitude":"-0.058","description":"This is the description of POI#21","name":"POI#21"},{"id":"22","longitude":"0.011","latitude":"-0.019","description":"This is the description of POI#22","name":"POI#22"},{"id":"23","longitude":"0.079","latitude":"-0.037","description":"This is the description of POI#23","name":"POI#23"},{"id":"24","longitude":"-0.099","latitude":"-0.09","description":"This is the description of POI#24","name":"POI#24"},{"id":"25","longitude":"0","latitude":"0.049","description":"This is the description of POI#25","name":"POI#25"},{"id":"26","longitude":"0.001","latitude":"-0.077","description":"This is the description of POI#26","name":"POI#26"},{"id":"27","longitude":"0.003","latitude":"-0.09","description":"This is the description of POI#27","name":"POI#27"},{"id":"28","longitude":"0.088","latitude":"0.072","description":"This is the description of POI#28","name":"POI#28"},{"id":"29","longitude":"-0.043","latitude":"-0.046","description":"This is the description of POI#29","name":"POI#29"},{"id":"30","longitude":"-0.026","latitude":"-0.014","description":"This is the description of POI#30","name":"POI#30"}]

Hi Richard,


There is no specific format limitation for the json data - so if the file is valid, there shouldn't be any issue. I quickly checked the file and it seems that there is a huge number of POIs contained all over the World. We would suggest only loading the POIs in the users surrounding. 


So for testing (in addition to the standard debugging of the code) I would recommend to just take out 2-5 POIs in your surrounding to see if the json in general is parsed correctly.


As for the license - this functionality is also available in the Trial version.


Greetings

Nicola

I am using the free trial at the moment, do I need to sign up for the paid version? I wanted to test it out first.

Login or Signup to post a comment