Discussion Forums  >  Uncategorized

Replies: 29    Views: 228

Sats4eva
Lost but trying
Profile
Posts: 44
Reg: Jan 01, 2012
Toronto, ON
440
01/03/12 12:37 PM (12 years ago)

Multi Pin Map Workaround

Hi guys, so I was struggling to create a JSON file that is compatible with buzztouch using my existing SQL database. So I figured out a way to export data from my database into a .csv and created an excel file that takes the data and converts it into a JSON file compatible with buzztouch. Its not the most innovative approach but something that is usable and i've tried it out...works flawlessly. Your excel file needs to have the itemid, name, lat and long and if you want the subtitle (i left that blank). You then go over to the next tab, drag down the first column and the JSON data auto populates (The stuff between the square brackets). You copy and paste that into a text file and load it to your server. I cant seem to upload on here but if anybody needs help/directions on using it i'd be happy to send it to you and explain how to use it. Just offering some help.
 
MGoBlue
Apple Fan
Profile
Posts: 980
Reg: Jun 07, 2011
Gold River, CA
10,600
like
01/03/12 12:42 PM (12 years ago)
I'd love to see what you've got. How many locations are you mapping? I've got an app that has a relatively large database of points and I'm having some difficulty pulling the data properly. Funny, I do this for quizzes all the time without problem, but the map file has given me some difficulties. Would you mind emailing me (jeff at jc-evans.com)? Thanks
 
Sats4eva
Lost but trying
Profile
Posts: 44
Reg: Jan 01, 2012
Toronto, ON
440
like
01/03/12 12:47 PM (12 years ago)
No problem at all. I have 60 locations right now that I was able to put into the app within a few minutes. When I get home I would be happy to send it to you. I'll also do my best to post up a quick tutorial.
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
01/03/12 02:08 PM (12 years ago)
MultiMap here we go. Just wanted to follow the post.
 
rgtichy
Lost but trying
Profile
Posts: 104
Reg: Oct 14, 2011
Barrington
1,040
like
01/03/12 02:18 PM (12 years ago)
If I were looking to do this, I might look at pipes.yahoo.com as a place to build a script that automatically fed out a database as Json or rss I've been pretty impressed with what can get done using pipes, and I kind of hope/assume yahoo won't disappear.
 
MGoBlue
Apple Fan
Profile
Posts: 980
Reg: Jun 07, 2011
Gold River, CA
10,600
like
01/03/12 02:56 PM (12 years ago)
Great idea on pipes. I use pipes in a number of apps and it's been a great tool.
 
MGoBlue
Apple Fan
Profile
Posts: 980
Reg: Jun 07, 2011
Gold River, CA
10,600
like
01/03/12 03:04 PM (12 years ago)
Has anyone had experience pulling in a large database -- say 20,0000 items? Trying to figure out the best way to tackle this. There are roughly 20,000 golf courses in the US and I've got a geocoded database I can draw from. I'd like to be able for a person to open their app and have a map of all the courses within a certain radius. The problem I'm running into is the size of the database makes loading difficult. Is there a way to store it locally in the app and pull from the database? Or does anyone have a suggestion for how to parse the app into smaller increments. I'd rather have the map function fully automatic rather than having the user pick a city or state first. Appreciate any thoughts/suggestions on this. Thanks.
 
rgtichy
Lost but trying
Profile
Posts: 104
Reg: Oct 14, 2011
Barrington
1,040
like
01/03/12 03:32 PM (12 years ago)
MgoBlue, You can probably do this with pipes, I've got some ideas about how. Yahoo local module would help with using geocoding and you could pass users lat + long into pipe to pull nearby locations etc. Robertgtichy , g mail
 
Sats4eva
Lost but trying
Profile
Posts: 44
Reg: Jan 01, 2012
Toronto, ON
440
like
01/03/12 05:01 PM (12 years ago)
MgoBlue, I've emailed a zip file to you. Please let me know you received it. In there i did up a quick instructions.txt, sample.txt and the excel file. Just to ensure I wasn't smoking something when I did this, I took some sample data from work and was able to successfully port over 1000 locations onto the iphone app. The only limit to how many you can do is the line limit in excel. If you have more than 65000 points then all you would need to do is populate this multiple times and append the result to the sample txt file.
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
01/03/12 06:03 PM (12 years ago)
Sats4eva, if you don't mind sharing I'd appreciate a copy. Looking at similar type App (not golf). Fred
 
Sats4eva
Lost but trying
Profile
Posts: 44
Reg: Jan 01, 2012
Toronto, ON
440
like
01/03/12 06:29 PM (12 years ago)
Fred, np. what address can i send to?
 
PSMDanny
Apple Fan
Profile
Posts: 1166
Reg: Dec 09, 2011
Heerlen
21,940
like
01/04/12 03:59 AM (12 years ago)
Hi Sats4eva, please count me in for a copy. Love to see that example and try converting it to my own needs. Please send copy to info at parkstadmedia dot nl Thanks in advance, Danny
 
Sats4eva
Lost but trying
Profile
Posts: 44
Reg: Jan 01, 2012
Toronto, ON
440
like
01/04/12 05:32 AM (12 years ago)
Hi Danny, just sent it to you.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
01/04/12 06:47 AM (12 years ago)
20,000 locations, I can see how this could get slow, especially on a slow server. But, on well indexed database with a relatively good processor you shouldn't have any trouble doing this. I've done the exact same thing with more than 100,000 locations. My approach: a) Grab device location from URL (as demonstrated in a few samples / posts) b) Do a FAST sql query to load the courses. It's sometimes best to do NO filtering on these, the table will 'dump' very fast if you don't have any complicated WHERE / JOIN or other expensive (and almost never optimized) conditions c) use PHP (middle layer) to do the filtering around the 'point' in the radius. Lots and lots of folks get bogged down (and bog down their db) by trying to get the data filtered in the query. Sure you can do it but it's normally much faster to do this with PHP than with SQL. I realize this goes against common wisdom and for sure you can optimize and tune your db to run your query faster but most folks don't understand large datasets and performance. So, PHP comes in handy for this kinda thing and does wonders. My two cents, sounds like a good challenge. If you want to send me a CSV or SQL dump with the locations I can have a look and offer some tips?
 
PSMDanny
Apple Fan
Profile
Posts: 1166
Reg: Dec 09, 2011
Heerlen
21,940
like
01/04/12 06:51 AM (12 years ago)
Hi Sats, File recieved. Much thanks and appreciation for this. Best Regards, Danny
 
Dkeller
Aspiring developer
Profile
Posts: 153
Reg: Aug 18, 2011
Saint Augustine
3,680
like
01/04/12 09:39 AM (12 years ago)
@Sats4eva, I'd also like a copy if you would! skidz at ureach dot com. Thanks in advance! Thanks for the input David, I didn't think about it like that! That'll be another approach to try!
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
01/04/12 10:02 AM (12 years ago)
Fred at Myskylla.com Fred
 
Sats4eva
Lost but trying
Profile
Posts: 44
Reg: Jan 01, 2012
Toronto, ON
440
like
01/04/12 12:50 PM (12 years ago)
Fred/Dkeller, sent it to you. rgtichy, I like the pipes idea. Do you have a pre-built pipe that you can share? I'm guessing you'd have to fetch the data in a CSV and then filter out what you need and convert to a JSON? Also does this mean you'd need to have a job to convert SQL to CSV automatically (assuming I wanted this updated daily). Also are you aware if the JSON output from pipes is compatible to buzztouch? I used a JSON from another source that was not compatible.
 
PSMDanny
Apple Fan
Profile
Posts: 1166
Reg: Dec 09, 2011
Heerlen
21,940
like
01/04/12 03:11 PM (12 years ago)
Hi Sats, just wanted to let you/everyone know that the excel sheet doesn't work with OpenOffice and LibreOffice. Don't have MS-Office, just these 2. Formula on sheet1 gives output on every row: #VALUE! (too bad) Best Regards, Danny
 
Sats4eva
Lost but trying
Profile
Posts: 44
Reg: Jan 01, 2012
Toronto, ON
440
like
01/05/12 05:32 AM (12 years ago)
Is that because OpenOffice doesn't support certain formulas?
 
PSMDanny
Apple Fan
Profile
Posts: 1166
Reg: Dec 09, 2011
Heerlen
21,940
like
01/05/12 06:28 AM (12 years ago)
Hi Sats, I guess so or OpenOffice has a different system in creating formulas. Don't really know. Best Regards, Danny
 
rgtichy
Lost but trying
Profile
Posts: 104
Reg: Oct 14, 2011
Barrington
1,040
like
01/05/12 07:48 AM (12 years ago)
Sats4eva, regarding Yahoo Pipes; I don't have a pipe like the one we're talking about here, but if someone started building one at Yahoo, I could help with it, to the best of my abilities. (I'm getting decent at it.) But also on the developer help boards in pipes, there is a user named hapdaniel (who is in the UK, so timezones affect his timeliness for me at least) that can make pipes dance! I mean it, he seemingly can turn a wordpress blog into a youtube video using pipes.
 
rgtichy
Lost but trying
Profile
Posts: 104
Reg: Oct 14, 2011
Barrington
1,040
like
01/05/12 07:51 AM (12 years ago)
I would guess that a pipes solution might involve using YQL (Yahoo Query Language) against the database, to subselect a smaller set of golf courses (on zipcode, e.g.), then geocode those in pipes and then filter again in pipes...
 
Zzeek
Lost but trying
Profile
Posts: 21
Reg: Jan 04, 2012
East grand fork...
210
like
01/05/12 11:14 PM (12 years ago)
Sats4eva if you could also please send me a copy! Looks like you are most popular on this post !! =)!. jonj.24hour(at)hotmail. Thanks!
 
hacerapps
buzztouch Evangelist
Profile
Posts: 542
Reg: Jan 30, 2011
usa
11,170
like
01/06/12 02:12 AM (12 years ago)
need to fallow this post lol
 
Sats4eva
Lost but trying
Profile
Posts: 44
Reg: Jan 01, 2012
Toronto, ON
440
like
01/06/12 07:30 AM (12 years ago)
John, just sent it to you. Danny, if you send me your data in a CSV in the format that i've suggested I can convert it for you as a test to see how it works.
 
Zzeek
Lost but trying
Profile
Posts: 21
Reg: Jan 04, 2012
East grand fork...
210
like
01/06/12 08:54 AM (12 years ago)
Sats4eva thanks you sir! Jon
 
PSMDanny
Apple Fan
Profile
Posts: 1166
Reg: Dec 09, 2011
Heerlen
21,940
like
01/06/12 05:08 PM (12 years ago)
Hi Sats, I managed to get your example working. Looks nice and thanks for sharing. Bad thing is that I can't edit your file to suit my needs (because of the OpenOffice problem). It gives me an idea how to do it and maybe convert it (eventually) to a php-script. Best Regards, Danny
 
Paddy
Lost but trying
Profile
Posts: 240
Reg: Oct 08, 2011
Hands Up !
12,500
like
01/07/12 03:20 PM (12 years ago)
Sats4eva, Could you please send to paddy2a(at)hotmail com ? Very interested, thanks
 
snits
Aspiring developer
Profile
Posts: 5
Reg: Aug 21, 2013
Sneek, Nederlan...
4,950
like
04/14/14 11:52 PM (10 years ago)
hello there, this seems just what i need for my app. in the first edition i manually filled them in and it took me some time ;-) could you send me this tutorial Chris at app-o-theker.nl thanks in advance
 

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.