Discussion Forums  >  Maps, Device Location, Tracking

Replies: 10    Views: 197

metrocitizen
Aspiring developer
Profile
Posts: 9
Reg: Apr 23, 2014
Tallahassee
4,840
04/27/14 11:35 PM (10 years ago)

Adding in procedural created items into JSON configs

Hello, I have over 20,000 listings that I want to add to the app. I am generating a JSON compatible array that should inject fine into the current configuration files... but. How do I get around the itemid and even more, how do I add the arrays into the configuration file? I'm thinking it may be better to have this information imported from online when the application loads. But I would like to try to keep all information offline due to the nature of my app.
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
04/28/14 08:56 PM (10 years ago)
dataURL is your friend -- look in the Control Panel for section. The dataURL will grab the data from an external URL. If you want that data to be on the device, then the plugin may need modification to grab the data from a local file. loadScreenObject is also in your future, if you want to dynamically load up the next screen. Use this helpful guide by Smug Wimp: https://dl.dropboxusercontent.com/u/115208762/loadScreenObject.zip Let me know if you need help. -- Niraj
 
metrocitizen
Aspiring developer
Profile
Posts: 9
Reg: Apr 23, 2014
Tallahassee
4,840
like
04/29/14 07:43 PM (10 years ago)
Hello, the guide you listed has no documentation for me to read... Could you please tell me where I can learn how to use the dataURL? Does the data need to be formated a certain way? Or do I need a script to interpret the data and put it in the right place? Thanks for the help.
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
04/29/14 08:49 PM (10 years ago)
Check out this documentation for the Simple Menu plugin -- start with that basic example. http://www.buzztouch.com/docs/v1.5/screen_menuList.php Then point your dataURL to this remote file: http://www.buzztouch.com/docs/v1.5/sample-menuItemsList.txt -- Niraj
 
metrocitizen
Aspiring developer
Profile
Posts: 9
Reg: Apr 23, 2014
Tallahassee
4,840
like
04/29/14 11:20 PM (10 years ago)
Okay, I'll try this out! But is there any way to include extra child data without using dataURL? Like editing BT_config.txt?
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
04/30/14 07:37 AM (10 years ago)
You can indeed add more child items by editing the bt_config.txt file. However, any changes to the Control Panel will override your manual edits. Unless you comment (change property name) of the first two JSON lines in that file such that it does not connect to the Control Panel. Disconnecting from the Control Panel should be a purposeful decision. What is your situation?
 
metrocitizen
Aspiring developer
Profile
Posts: 9
Reg: Apr 23, 2014
Tallahassee
4,840
like
04/30/14 07:59 PM (10 years ago)
I want to include the locations to places my company lists on their website. this includes over 20,000 entries (wifi locations alone are about 22k locations). However, we want to make the information locally obtainable so that it can be used while offline (this is an app for tourist to use while visiting Japan). How could I set it so that the user only needs to download the data once?
 
metrocitizen
Aspiring developer
Profile
Posts: 9
Reg: Apr 23, 2014
Tallahassee
4,840
like
04/30/14 08:05 PM (10 years ago)
Wait... couldn't I just include the information as a file and then use a script to parse it into bt_config?
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
04/30/14 11:34 PM (10 years ago)
20,000 data items will kill the mobile device. It cannot process that much in memory. Instead, you have to filter or reduce those items. Then have the device show only those items. Are you intending on showing only items within a specific radius? Then perhaps you should keep a database on the device. The radius and current location can be used to query an on-device database. That will return a much smaller data set. -- Niraj
 
metrocitizen
Aspiring developer
Profile
Posts: 9
Reg: Apr 23, 2014
Tallahassee
4,840
like
04/30/14 11:42 PM (10 years ago)
Yes exactly Niraj. I plan on showing only in a radius. Also only specific items as well. (We'll have restaurants and such). How can I set buzztouch to implement this database? I assume I'll need to write a script to do this correctly, but do you have any info that will point me in the right direction? Best Regards, Metrocitizen
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
05/01/14 09:19 AM (10 years ago)
Browse through the How To section, an example of a guide by GoNorthWest https://www.buzztouch.com/resources/ "Posting a Device's Current Location to a Database" This guide details the necessary steps to gather information about the devices location, log them to a backend database, then output the results on a map. This technique can be very very useful and flexible for location aware apps. https://www.buzztouch.com/files/hoots/Posting_Current_Location_to_a_Database_v1.0.pdf -- Niraj
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.