Start a new topic

Retrieving POI Data

Retrieving POI Data


I have followed this link to retreive POI

http://www.wikitude.com/external/doc/documentation/3.0/android/retrievingpoidata.html

It explains 3 different ways to retrieve data.

I few questions related to POI data:

1. For loading POI data from web service which file extension should be used ? I wish to store POI data on my google drive or dropbox. So should I store it as .json or .txt

2. In POIDATA_SERVER: "http://example.wikitude.com/GetSamplePois/" . Can I specify the path of the Json file locally in the assets folder of Android Project or assets folder of the Javascript project.

3. From the 3rd method mentioned in the documentation link architectView.callJavaScript() can be used to push Json data from the native app. Can you give a general example on how it is done if have a file locally.

(Android Development)

Thanks

Hi Vinay,

1.) The file extension doesn't really matter (I suggest to use json though if you have a static file). It is more important to set the right mime-type in the response header (Content-Type: application/json). This way, your frontend will be notified that the data that is passed is actually JSON data.

2+3.) In case you want to get data from local files, you cannot use the webserver-approach, you need to use the "local file" approach. Please refer to our examples app that comes with the SDK download. Example 3.1 (POI at Location) shows you how to fetch data from a local source (an asset folder in your javascript package, which is the preferred way).

Best,

Martin
Login or Signup to post a comment