Discussion Forums  >  Uncategorized

Replies: 61    Views: 942

peter
I hate code!
Profile
Posts: 95
Reg: Jan 21, 2011
netherlands
1,250
03/22/11 03:12 AM (14 years ago)

Location Map: read locations from file?

Hi there, I want to plot upcoming events on a location map. Adding multiple locations can be done from the control panel, but I am wondering if it is possible to read the locations from file. I have this request because the list of events is dynamic, and events that already took place must be deleted from the list. So it would be wonderful if I can centrally manage the list of events with gps coordinates. Any thoughts? Thanks
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
03/22/11 03:37 AM (14 years ago)
Hi in Netherlands.... with v1.5 YES, with v1.4, not easily. I just finished (yesterday) doing this exact thing with another site visitor and hope to create a tutorial out of the files. I havn't found the time to do the documentation / video, etc. In the meantime... have a look at this URL. It's the URL I was using as test. The PHP limited the output to locations within a certain radius and it worked very well. This is the output of the script (this URL is sample data) http://www.buzztouch.com/applicationScreens/locations_demo.txt If you want to create your own file... make the file, then enter the URL to the file in the Data URL box (advanced settings) for a map screen.
 
peter
I hate code!
Profile
Posts: 95
Reg: Jan 21, 2011
netherlands
1,250
like
03/22/11 09:03 AM (14 years ago)
Hi David, I tried your URL and works perfectly. I also created a text-file with all the data in it, and worked fine also! Thanks a lot! You made a php script to output only the locations in a radius of x miles, which is usefull for my app: just display the events in the neighborhood. To implement that, it would be nice to have your php script, so the math is already done :-) Is that possible? Furthermore I would like to output only events in the future, not to display events in the past. I guess the with some same logic it is possible to take the current date and filter the old events, right? Thanks!
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
03/22/11 09:29 AM (14 years ago)
Yes, exactly, filtering events server-side is tremendously powerful. I'm working out the video / documentation for how this works but have not yet finished. When that video series is done it will be much much easier. In the meantime....do you have PHP skills or are you relying on a developer? I'm asking because I can't get into a situtation where I give you a script that turns into me teaching you how to use it ;-)
 
peter
I hate code!
Profile
Posts: 95
Reg: Jan 21, 2011
netherlands
1,250
like
03/22/11 09:39 AM (14 years ago)
David, I understand your worries. I have some PHP skills and give you my word that I won't ask for your time (on this topic :-))
 
erichopf
buzztouch Evangelist
Profile
Posts: 316
Reg: Mar 14, 2011
NY, NY
3,460
like
03/22/11 11:28 AM (14 years ago)
Peter, I have been trying to figure this out, in between soothing a baby cutting her first 2 teeth, so I'm a bit lost. You seem to have a handle and I don't want to take David's time away from working on the CMS. Mind throwing me a hint? Tried the php sample David pointed to, but that didn't work for me. I have made a test file as a php file. Attempted to call to both from the URL Data box, but I don't show any results, just that my code is not valid via this *Error message* ~Error~ There was a problem parsing some configuration data. Please make sure that is is well-formed. Any suggestions or advice? file- http://www.hopfoto.com/sample_data.txt Thanks for any light you can shed on this.
 
peter
I hate code!
Profile
Posts: 95
Reg: Jan 21, 2011
netherlands
1,250
like
03/22/11 01:27 PM (14 years ago)
@erichopf To begin with you last question. The sample_data.txt file doesn't look good. I don't know the details of your setup, but I think the parsing problem is in the screenID's and Nicknames. After editing your file and entering a correct set of ID's and nicknames (from Davids example), your gps locations are working fine. Here (http://dl.dropbox.com/u/9809996/cissp/maps.txt) you find the working version, please compare it with your version and zoom in on itemIDs, Nicknames and DataURL. Why the php script doesn't work is not clear to me. It worked fine when I tried it. Just paste the URL in the (Screen) Data URL, save and refresh your app. What part didn't work? @david Can't find the URL with the PHP script and radius anymore. Should I call my shrink or did you edit your post? In the data-file, how do I link to an other screen when tapping on a location (which property)? Do I need the ItemID, and where can I find it?
 
erichopf
buzztouch Evangelist
Profile
Posts: 316
Reg: Mar 14, 2011
NY, NY
3,460
like
03/22/11 05:38 PM (14 years ago)
Peter, Thanks. I found that my text editing program inserted commas after each location, causing the issue. Your assistance is appreciated.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
03/23/11 02:49 AM (14 years ago)
Hi Guys... ' Do I need a shrink ' - too funny. No, the URL to the .PHP script did change. I didn't realize when I posted it that the long list of locations it was outputting was 'private' - guess location databases are valuable? Who-da-thunk-it. Anyway... I started the tutorial and the docs so you can make sense of it. The difficult / techie part is what happens when a location is tapped. Like peter mentioned.. 'where do I get the ids' - it's complicated. The challenge here is typical. We want to show everyone how cool this CAN be but in doing so we end up spending countless hours answering questions about things we think are 'simple.' Of course we understand and it's totally normal and OK to ask. But, the software (your app) is incredibely complicated and even with documentation it's hard to figure out how to make it all work. I just sent both of you an email with the .PHP file so you can explore it.
 
peter
I hate code!
Profile
Posts: 95
Reg: Jan 21, 2011
netherlands
1,250
like
03/23/11 04:43 AM (14 years ago)
Hi David, thanks you for tour quick respons and email. As you already said, the challenge is how to display info when a location is tapped. I think I figured out how to use this, The itemid in my csv file corresponds with the itemid in the url http://www.yourdomain.com/locations_details.php?itemId=. So the output of the URL is the content that is shown when tapping on the locations. Because the info must be unique for every location, the itemid is used. To make this work for me, I have two options: 1-I need the locations_details.php script to display my pages or 2-I build my own URLs, eg http://www.yourdomain.com/Mypage' . $itemId . .html' (becomes http://www.yourdomain.com/Mypage1.html if itemid=1) Because I promised not to take up any more of your time, can you just give a brief comment on: Is option 1 correct, and is it possible to send me the php file Is option 2 correct
 
erichopf
buzztouch Evangelist
Profile
Posts: 316
Reg: Mar 14, 2011
NY, NY
3,460
like
03/23/11 01:15 PM (14 years ago)
There is an app that I use and would like to emulate the map they have. They use 3 different colored pins to differentiate between a few types of restaurants. Any suggestions or clues? http://dl.dropbox.com/u/14348028/photo.png
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
03/23/11 01:23 PM (14 years ago)
You hiding in our meeting room or what? The next release (a day or two untill the long list of known issues are finalized) includes exactly this. iOS only supports three 'native' pin colors. Red, Green, Purple. Blue is reserved for the users location. The upcoming release supports a new data point in the confiugration file for 'pinColor' - each location can set this, defaults to red. This means you'll be able to modify the .PHP file to include the 'pinColor':'red' or 'pinColor':'green' with each location in the list. Future: Longer term, we hope to allow URL's and / or icon names for icons on the markers. This gets a bit tricky but we've worked out some of the tough parts already. I wanna see an actual icon, logo, face on the locations - not just a pin!
 
peter
I hate code!
Profile
Posts: 95
Reg: Jan 21, 2011
netherlands
1,250
like
03/23/11 01:47 PM (14 years ago)
Just to roundup my experiences: Option 2 in my post of earlier today is working perfectly. On my own domain I have some hmtl pages (Page1.html, Page2.html, etc) where the number is corresponding with the itemId of the locations file. Tapping the location dispays the corresponding html file. Thank you very much David for sending me the php file! update: the ItemID doesn't have to be a number. So entering 'MyRestaurant' as itemId will point to MyRestaurant.html of my website. Perfect...
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
03/23/11 09:25 PM (14 years ago)
Glad out it figured out. The details.php page was super simple and not implemented. All it was was an 'empty' page that successfully grabbed the itemID from the URL so the app owner could develop whatever details logic they wanted. Good work.
 
peter
I hate code!
Profile
Posts: 95
Reg: Jan 21, 2011
netherlands
1,250
like
03/25/11 06:32 AM (14 years ago)
Got the following problem which is driving me crazy... As I mentioned before I have a working setup with the locations.demo.php script and a locations_sample.csv as input file. The location pins show up perfectly on my map, even with the radius option. But... always a but... When I edit my locations_sample.csv file to contain more then 4 entries, it won't work anymore. To avoid typo's in the entries, I duplicated an existing location entry. But as soon as I have a 5th entry, the app presents the error: There was a problem parsing some configuration data. Please make sure it is well-formed. After deleting any entry (even the first), the thing works again... Example (i changed de delimiter, but with a , i have the same behaviour): itemID;latitude;longitude;title;subTitle 1;46.088365;-64.778264;Onzin1;SubOnzin1 2;53.217138;6.57357;Onzin2;SubOnzin2 4;52.848381;4.34968;Onzin4;SubOnzin4 5;51.848381;4.34968;Onzin5;SubOnzin5 Any thoughts?
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
03/25/11 09:04 AM (14 years ago)
Kindly email the URL to the .php file you are pulling data from, I'll get a look. Send the email to info 'at' buzztouch.com, attach the .csv file if it's not huge. I'll request the URL so I can see what's up ;-)
 
peter
I hate code!
Profile
Posts: 95
Reg: Jan 21, 2011
netherlands
1,250
like
03/25/11 09:23 AM (14 years ago)
David, I've emailed the requested info. Thanks!
 
Annonymous
Profile
03/29/11 12:46 PM (14 years ago)
Peter, Could you help, if you have a moment? I am having a issue implementing the php file after I have altered it. When I put the php into the url and read the output, there is an extra ,(comma) after each {item}, before the break and next item causing the error message from buzztouch- ~Error~ There was a problem parsing some config data. Please me sure that is it well-formed. Once I take out the commas and save the file as a text file and point to that, it shows up as expected. Any ideas?
 
erichopf
buzztouch Evangelist
Profile
Posts: 316
Reg: Mar 14, 2011
NY, NY
3,460
like
03/29/11 01:57 PM (14 years ago)
Strange, I posted a question and it never appeared in this thread. Is there an issue with the forum?
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
03/30/11 12:51 AM (14 years ago)
Did the question vanish? First I've heard of that one. However, nothing would surprise me at this point. This site is getting ridiculously busy and anything could happen - right? Did you get the question posted OK? Hope so.
 
peter
I hate code!
Profile
Posts: 95
Reg: Jan 21, 2011
netherlands
1,250
like
03/30/11 01:00 AM (14 years ago)
FYI It looks like a question did vanish. Yesterday I got an email that there was a new posting in this topic. After clicking the link, I got into this topic, but no new post found...
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
03/30/11 01:25 AM (14 years ago)
Ah... could be this, but not sure. Sometimes, folks double-post the exact same question. We try to remove them. But, if you got an email about a question, which means you posted to it, it should not have been removed (we don't remove questions with remarks, we try to remove the dups before anyone comments). This could be the trouble?
 
volley
Aspiring developer
Profile
Posts: 37
Reg: Feb 19, 2011
Amsterdam
10,570
like
03/30/11 01:47 AM (14 years ago)
Hi David, I'm trying to work out the same thing (showing radius based locations) and would appreciate it if you could send me the php file.
 
erichopf
buzztouch Evangelist
Profile
Posts: 316
Reg: Mar 14, 2011
NY, NY
3,460
like
03/30/11 05:09 AM (14 years ago)
I didn't post twice. Perhaps it was due to parentheses and the forum program took it as html? I don't know. My issue is this, I have altered the sample php file and I am receiving the Error message that the info is not parsed correctly. When I type the php path in to a URL, the resulting file looks great, except there are commas at the end of each line. When I save the result of the php script, as a text file sans the commas at the end of each line, the results show as expected. I have tried many ways and cannot get the php to render properly. Any clues from any of the users? *Edit* Scratch that. I apperently wasn't calling the php file correctly. Once I added additional info such as- ?outputType=mapLocations&latitude=[deviceLatitude]&longitude=[deviceLongitude]
 
peter
I hate code!
Profile
Posts: 95
Reg: Jan 21, 2011
netherlands
1,250
like
03/30/11 06:10 AM (14 years ago)
Hi erichopf. I had the same behaviour in my app and scripts. Not sure if it's the same problem, but perhaps it will help. My experiences: In the resulting file (the output of the php script) all lines (entries) should end with a comma EXCEPT the last one. So each entry starts with {itemID and ends with }}, The last entry in the output file should end with just }} and ]} to end the file. The php file David sent us, only works with a maximum of 4 location entries in the input file. If you exceed that number, there will be an extra comma after the last entry (before the ]} ) If the symptons you have are simular, please try with only 4 entries (and no special characters). If that works ok, a simple adjustment to the php will be sufficient to make it work for more entries.
 
peter
I hate code!
Profile
Posts: 95
Reg: Jan 21, 2011
netherlands
1,250
like
03/30/11 06:57 AM (14 years ago)
@volley Hi Amsterdam, the city of Delft here... I can send you the requested file this evening. If that's okay with David.
 
volley
Aspiring developer
Profile
Posts: 37
Reg: Feb 19, 2011
Amsterdam
10,570
like
03/30/11 07:08 AM (14 years ago)
@peter, that would be great and I won't have to bother David. Thank u well.
 
peter
I hate code!
Profile
Posts: 95
Reg: Jan 21, 2011
netherlands
1,250
like
03/30/11 08:46 AM (14 years ago)
@volley Here you will find the files you need. If you have any questions, please let me know. http://db.tt/2ebQYtQ
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
03/30/11 08:53 AM (14 years ago)
Hi guys... yes, a little 'max locations flag' was set in the sample file. It should not have been left in but was. You'll see in the loop near the end where it reads if($parentCnt < 5) or something like that. Remove that line and it's matching closing curly brace and it'll be fine. Can't remember why I limited the output to 5? Maybe it was pulling from a giant csv file or something. Funny.
 
volley
Aspiring developer
Profile
Posts: 37
Reg: Feb 19, 2011
Amsterdam
10,570
like
03/30/11 09:40 AM (14 years ago)
@Peter Much obliged!
 
erichopf
buzztouch Evangelist
Profile
Posts: 316
Reg: Mar 14, 2011
NY, NY
3,460
like
03/30/11 11:35 AM (14 years ago)
@peter- Thanks, I have figured it out after sitting down with it and working it out. I forgot the outputType=mapLocations. After that fix, it was working correctly. @David Found the limit reference a while ago and just altered it for my needs. Worked like a charm Another issue I am facing is the max distance calling feature. The map pops up and shows a large map, as I have a point in Australia and India and I have my max radius set in the URL set at 50 miles. A ring pops up on the map around my location, but does not zoom in. Any suggestions would be appreciated.
 
peter
I hate code!
Profile
Posts: 95
Reg: Jan 21, 2011
netherlands
1,250
like
03/30/11 11:41 AM (14 years ago)
@erichopf The max radius is working perfectly in my setup. Did you change the Screen Data URL correctly to report your long/lat and maxRadius? In my setup it is: http://www.yourdomain.com/locations_demo.php?deviceLatitude=[deviceLatitude]&deviceLongitude=[deviceLongitude]&maximumDistanceRadius=50 Please mind the DEVICElongitude=, because in the controlpanel sample it just mentions longitude= (without the device).
 
erichopf
buzztouch Evangelist
Profile
Posts: 316
Reg: Mar 14, 2011
NY, NY
3,460
like
03/30/11 12:48 PM (14 years ago)
Ahh, I had...blahblah.php?outputType=mapLocations&latitude=[deviceLatitude]&longitude=[deviceLongitude]&maximumDistanceRadius=50 The example in the DATA URL is not written correctly, that's where I was confused. Thanks for the great info. Now I just have to figure out how to control the zoom.
 
erichopf
buzztouch Evangelist
Profile
Posts: 316
Reg: Mar 14, 2011
NY, NY
3,460
like
04/01/11 12:20 PM (14 years ago)
Peter, Any luck with the colored pins? I haven't been able to get the 'pinColor':'red', 'pinColor':'green', 'pinColor':'purple' to work.
 
peter
I hate code!
Profile
Posts: 95
Reg: Jan 21, 2011
netherlands
1,250
like
04/01/11 12:37 PM (14 years ago)
Hi Eric (?) Haven't tried the pinColor yet. Dont know if it has been implemented yet. Perhaps David can tell us if it's implemented in the last release of march 28th. When I think about it, according to David you can set a pin color for each location. So in the input file (csv) we must add an extra column with the pincolor, and in each row the value. itemID;latitude;longitude;title;subTitle;pinColor 1;46.088365;-64.778264;Onzin1;SubOnzin1;blue In the php script the pincolor must be in the output, an extra line of code for writing the pincolor is needed. I have no idea what the correct syntax and variable names are, so this is for what its worth... Keep me posted...
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
04/01/11 11:13 PM (14 years ago)
As of the latest release, Pin Colors are adjustable for each location typed in the control panel. This also means you can modify the output of the .PHP script to print a pin color for each location's JSON representation. The syntax is: pinColor:green pinColor:purple pinColor:red Surround the property name and the value with double quotes. Blue is iOS reserved for the devices location. Custom Icons from your project or your URL for pins coming soon ;-)
 
Mario
Code is Art
Profile
Posts: 58
Reg: Mar 21, 2011
location unknow...
580
like
04/06/11 06:45 AM (14 years ago)
Hi guys! I am trying whole day to make it work. But couldn't. I seted up everything,but can't get &maximumDistanceRadius to work. This are some of the Screen data URL-s I tried,but didn't work: http://www.mydomain.com/locations_demo.php?outputType=mapLocations&deviceLatitude=[deviceLatitude]&deviceLongitude=[deviceLongitude]&maximumDistanceRadius=50 (shows only my simulator location) http://www.mydomain.com/locations_demo.php?deviceLatitude=[deviceLatitude]&deviceLongitude=[deviceLongitude]&maximumDistanceRadius=50 (shows only my simulator location) http://www.mydomain.com/locations_demo.php?Latitude=[deviceLatitude]&Longitude=[deviceLongitude]&maximumDistanceRadius=50 (on this shows other locations,but without max distance-shows every location) My .csv: itemID,latitude,longitude,title,subTitle 1,46.088365,-64.778264,Title1,SubTitle1 2,57.848381,-104.34968,Title5,SubTitle5 3,37.848381,-122.34968,Title6,SubTitle6 I checked everything,tried hundreds of changes but can't manage to make it work. Has anyone any idea?
 
peter
I hate code!
Profile
Posts: 95
Reg: Jan 21, 2011
netherlands
1,250
like
04/06/11 07:27 AM (14 years ago)
Hi Mario You are working in your simulator, which means that your current location is always Cupertino, Canada. I guess your last location is the one within the 50 radius? It's a close call. Did you try to set de Radius to 500, my guess is the extra location shows up... The correct Screen data url should be the first one you mentioned. Does this help?
 
Mario
Code is Art
Profile
Posts: 58
Reg: Mar 21, 2011
location unknow...
580
like
04/06/11 08:04 AM (14 years ago)
Hi Peter, Thank you Peter for an answer! :) I tried 100,500,1000 but no luck. Just shows my location and nothing else. Best regards, Mario
 
peter
I hate code!
Profile
Posts: 95
Reg: Jan 21, 2011
netherlands
1,250
like
04/06/11 08:20 AM (14 years ago)
Are you sure your current location is reported correctly? If you drop me your PHP script and csv, I will give it a try in setup... (what is your screendata url, so i can test that)
 
erichopf
buzztouch Evangelist
Profile
Posts: 316
Reg: Mar 14, 2011
NY, NY
3,460
like
04/06/11 08:30 AM (14 years ago)
Mario, Firstly, did you build the php file yourself or download it? The file may not be configured properly. What are you running the app on? iOS Simulator or iOS Device. Where are you located? The locations are very distant from each other, San Fran and 2 in Canada. Depending on what you're using, as in the simulator, they won't show up unless you do a much larger radius.
 
Mario
Code is Art
Profile
Posts: 58
Reg: Mar 21, 2011
location unknow...
580
like
04/06/11 08:36 AM (14 years ago)
Thank you guys for helping! Yes, reports Apples HQ in Cupertino. Screen data URL: http://faca.isgreat.org/locations_demo.php?outputType=mapLocations&deviceLatitude=[deviceLatitude]&deviceLongitude=[deviceLongitude]&maximumDistanceRadius=500 For testing I used David's script (removed limit reference only). I use iOS simulator iPhone 4.2 Tested maximumDistanceRadius from 1 to 10000 but no luck.
 
erichopf
buzztouch Evangelist
Profile
Posts: 316
Reg: Mar 14, 2011
NY, NY
3,460
like
04/06/11 09:09 AM (14 years ago)
Mario, For some reason I am unsure of, the locations are not being plotted in the Simulator, but are working on my iPhone that is running a test app. I'm in NY, so I had to use 5000 for the radius in order to get all points to show.
 
peter
I hate code!
Profile
Posts: 95
Reg: Jan 21, 2011
netherlands
1,250
like
04/06/11 09:15 AM (14 years ago)
Mario, your Screen Data URL in my app on a real device (ipad) works fine! As erichopf mentioned, probably a simulator issue?
 
Mario
Code is Art
Profile
Posts: 58
Reg: Mar 21, 2011
location unknow...
580
like
04/06/11 10:55 AM (14 years ago)
Oh,thanks so much guys! Strange. Probably a simulator issue. Kind regards, Mario
 
max1592
I hate code!
Profile
Posts: 27
Reg: Jun 07, 2011
venice
2,820
like
07/01/11 01:42 AM (14 years ago)
Hi guys! I am trying whole day to make it work. But couldn't. I seted up everything,but can't get &maximumDistanceRadius to work. Please someone can help me to do the query for 5km radius and second why i can't se may position on the map? ?outputType=mapLocations&deviceLatitude=[deviceLatitude]&deviceLongitude=[deviceLongitude]&maximumDistanceRadius=? is the correct syntax? Thank a lot
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
07/01/11 01:50 AM (14 years ago)
@ max1592: Glad to hear you've been digging through .PHP today. Sorry you havn't got it working yet. Maybe take this step-by-step. a) Get a map going that successfully pulls location data from your remote file. b) After this works, get the map to show your position (this is a simple setting in the control panel). c) After this works, you should have a map with a bunch of pins and your location. d) Next, try to get your backend to only show 'some' locations. Because your locations are coming from a .PHP file on your server, it's very very difficult to offer help. There are lots of ways to provide the locations. Command Seperated File (CSV), datatabse, text file etc. The method you use to narrow down the results will depend on a few things. I would start by using a your regular browser to load the location data. Enter the URL in your browser that matches the URL the phone is requesting. This way you can see the output and manipulate the variables in the URL by hand in your browser to test your script.
 
peter
I hate code!
Profile
Posts: 95
Reg: Jan 21, 2011
netherlands
1,250
like
07/01/11 02:13 AM (14 years ago)
Hi max1592 I guess you are using the locations_sample.php and .csv file as mentioned in this thread? If the locations map is working with the locations_sample.php, then it should be easy to add the radius option. The dataURL I use in my screen: http://yourdomain.com/locations_sample.php?deviceLatitude=[deviceLatitude]&deviceLongitude=[deviceLongitude]&maximumDistanceRadius=250 Keep in mind that: - you must have GPS location services enabled for you app - the locations_sample.php uses miles, not km's. (you can change that in the php code) - sometimes the simulator behaves strange, try to test it on a real device - it is possible to test it in your browser, past the DataURL in your browser and replace the [deviceLatitude] and [deviceLongitude] with actual GPS coordinates and the output should change (depending on your location list and position) Hope this helps, Peter
 
max1592
I hate code!
Profile
Posts: 27
Reg: Jun 07, 2011
venice
2,820
like
07/01/11 02:56 AM (14 years ago)
Wanderful persons in this forum! Thank a lot I solved my point on the map, my problem is the sql query, the sintax..... Select.... Where Hoever this is the url the file of my map jou can try http://www.venicebook.it/wp-content/themes/GeoPlaces3/library/map/item_listing.php At the moment i don't us the log and lat in this url but i understant ihave to.first i have tosolv the query Thanks
 
peter
I hate code!
Profile
Posts: 95
Reg: Jan 21, 2011
netherlands
1,250
like
07/01/11 04:02 AM (14 years ago)
You have a quesry problem, so I guess you aren't using a comma seperated text file as input, but are querying a database? Should work. I tried your URL with locations. The dataURL entries doesn't look correct to me. The slashes and backslahes aren't formatted correctly. Probably when clicking on a pin in your map the corresponding website doesn't show?
 
max1592
I hate code!
Profile
Posts: 27
Reg: Jun 07, 2011
venice
2,820
like
07/01/11 04:44 AM (14 years ago)
Thanks peter, in this moment i'm tring the app on my ipad and the map,with my position works fine. Yes,i'm query a db mysql and at the moment there is no filter.at the moment you see 6or7point and when you clik on my ipat i open the website of that point. For me this part is ok and i dont understant the problem you say.My first problem as i told you is the query, can you help me? Thanks
 
max1592
I hate code!
Profile
Posts: 27
Reg: Jun 07, 2011
venice
2,820
like
07/01/11 11:57 PM (14 years ago)
Hi guys! Here's the SQL statement that will find the closest 20 locations that are within a radius of 25 miles!! http://stackoverflow.com/questions/574691/mysql-great-circle-distance-haversine-formula
 
peter
I hate code!
Profile
Posts: 95
Reg: Jan 21, 2011
netherlands
1,250
like
07/02/11 02:30 AM (14 years ago)
Great, so is everything working now?
 
max1592
I hate code!
Profile
Posts: 27
Reg: Jun 07, 2011
venice
2,820
like
07/02/11 07:27 AM (14 years ago)
Ciao peter, not yet but i'm on the way! If can, i would ask you how do i do to show a dynamic detail screen.I mean, if i have one list of records and i wont to show the detail of the record haw do i do? I won to have one single layout for all the record detail Thanks
 
peter
I hate code!
Profile
Posts: 95
Reg: Jan 21, 2011
netherlands
1,250
like
07/03/11 02:40 AM (14 years ago)
Don't know if i understand your question. You have a list of records and want to show the details? Is this question related to the query you are building, or related on how doing this in de Control Panel within Buzztouch?
 
max1592
I hate code!
Profile
Posts: 27
Reg: Jun 07, 2011
venice
2,820
like
07/03/11 09:20 AM (14 years ago)
Ciao peter, yes I have a list of records and want to show the details, is not relataed to thequery of the map. I just won doing this in de Control Panel within Buzztouch.I have , in the db, one list of person, and i need to show the detail using a dynamic layout. thanks
 
Zeta_M
Apple Fan
Profile
Posts: 23
Reg: Sep 07, 2011
Aguadilla,Puert...
230
like
11/05/11 03:55 PM (14 years ago)
Ok I am completely lost with all the comments here :( is there a working app that I can download (for Android) to see the output of using this PHP scripts? I don't want to start working on it, get lots of headache and then, see that the output is not what I wanted :( Thanks!
 
appvision
Aspiring developer
Profile
Posts: 139
Reg: Jan 20, 2011
location unknow...
1,390
like
12/17/11 07:17 PM (14 years ago)
I have a map going that successfully pulls location data from my remote file using dataURL. I would like the user to be able to specify the zip code instead of hard coding a zip code into the dataURL. Can anyone provide some guidance on how this could be done? Thanks.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
12/17/11 10:27 PM (14 years ago)
@ appvision: The best approach depends on lots of factors and your skills. You could... a) Require a login to see the screen. In this case, you could pass the logged in users id in the URL to make the map. Your backend could use this URL to determine what pins to show for the logged in user. Not sure if this makes any sense. b) Zip Code entry: There is no input screen to enter a zip code. You could create an entry screen ( a custom UI VIew Controller) to enter the zip code. You could connect this Cusotm Class File to the right-button click (create a custom plugin screen that loads your entry form). In you custom entry form you could save the entry to the phones NSUserDefaults to use anywhere in the app. When the map screen loads, you could append this saved value to the map's dataURL. Just two ideas.
 
appvision
Aspiring developer
Profile
Posts: 139
Reg: Jan 20, 2011
location unknow...
1,390
like
12/26/11 09:21 AM (14 years ago)
Thanks very much for the info. I'll give it a try.
 
muhromatic
buzztouch Evangelist
Profile
Posts: 24
Reg: Dec 19, 2011
NYC
240
like
01/13/12 06:51 PM (14 years ago)
What an informative thread this is... Thank you to all involved... My question: As per Dave's Custom Icons from your project or your URL for pins coming soon ;-) Is this possible? if so, how to? Once again... Thank you to those who have taken part of creating this path that I am currently walking on... I am truly grateful... Glenn
 
nickrick32
Apple Fan
Profile
Posts: 111
Reg: Feb 28, 2011
location unknow...
1,110
like
04/05/13 11:11 AM (12 years ago)
Hi Peter, Do you have any example of "locations_details.php" how it looks like? After user tap on the location to open dynamically a details of this location. Thank you
 

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.