For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub
- This topic has 7 replies, 3 voices, and was last updated 13 years, 5 months ago by
zenja.
-
AuthorPosts
-
zenjaMemberHello dear reader 😉
So… im trying to make an app (well several actually) where i want to include the functionality of looking up a business (large list… 2900 atm…) and the option of displaying its adress in google maps and from there on be able to display and use a form of navigation.
So far i made a google map with all the locations and info on it, i yust dont seem to understand how i can get this in my app…
If i use the googlemap widget in mobi one it seems to me i have to write every single adress in javascript (not really an option with so many adresses) so how do i do this?Hope you guys can help me out a bit, feels like i yust need a push to be able to make this work since i used to be a webdeveloper professionally and worked with smalltime java and php before (in a cms), but ive been out of it for some years now and recently picked this up for a hobby.
thanks in advance.
Zenja.
March 12, 2013 at 7:36 pm #336580
support-octavioMemberYour app seems to be very cool. But it isn’t easy to give you an advice with just a general description. Can you share more details such how it should works for the final user? e.g. user will wrote a direction in a textfield and should select desired item from a result list and then load direction in just a map widget? Also, a couple of screenshots would help us to understand it better.
March 13, 2013 at 9:01 am #336591
YannMemberHello zenja
If i understand ,you want to populate a map with large remote data?
i had the same constraint in my app, on remote server i build a xml file from a search request and i put the result in my map widget with js.
YannMarch 13, 2013 at 9:39 am #336593
zenjaMember@support-octavio wrote:
Your app seems to be very cool. But it isn’t easy to give you an advice with just a general description. Can you share more details such how it should works for the final user? e.g. user will wrote a direction in a textfield and should select desired item from a result list and then load direction in just a map widget? Also, a couple of screenshots would help us to understand it better.
Hi octavio,
Thanks for the quick response.
screenshots arent really a possibility since all i have atm is a google map with all the data inserted which i want to use and some ideas about how to put this into a graphical form into the app (think business logo’s, buttons, etc.)The actual app is far from being built atm. since im trying to find out first how i should insert the mapdata in a logical way, since this is the biggest part of the app and after i figured this out im gonna focus on tweaking the app and making it look good.
What i want to do is having a map in the app where the user can lookup the desired destination by multiple ways.
– By nearest location, based on current location of user (gps)
– by name
– by city, etc. etc.So my dilemma atm is… should i use google maps for this or should i put the data in a database (for which i can hopefully use the KML file from google maps by converting it to a usable datasheet, but i also have a backup of data in excel sheet) and then call on it through a javascript search function.
thank for your time and effort.
Zenja.
March 13, 2013 at 9:42 am #336594
zenjaMember@Yann wrote:
Hello zenja
If i understand ,you want to populate a map with large remote data?
i had the same constraint in my app, on remote server i build a xml file from a search request and i put the result in my map widget with js.
YannThanks Yann, maybe this is the answer for the dillemma i have atm, im gonna look into doing it this way.
greets,
Zenja.
March 13, 2013 at 9:56 am #336595
zenjaMember@zenja wrote:
@Yann wrote:
Hello zenja
If i understand ,you want to populate a map with large remote data?
i had the same constraint in my app, on remote server i build a xml file from a search request and i put the result in my map widget with js.
YannThanks Yann, maybe this is the answer for the dillemma i have atm, im gonna look into doing it this way.
greets,
Zenja.
Some more info plz, what kind of remote server did u use (database type)?
My head hurts right now lol, too much info from reading (as i said been out of coding for a few years, and i was a novice at the best of times…)
But i will keep at it…March 13, 2013 at 10:09 am #336596
YannMemberhi lol
i’ve a sql server and i made a “search engine ” in asp.net.
I put a response.content xml/text to create on fly my xml
example of xml structure:<markers> <marker name="Yann" address="his adress" lat="00.000000" lng="-000.0000" nationality="FR"/> <marker name="John Doe" address="his adress" lat="00.000000" lng="-000.0000" nationality="US"/> </markers>And JS
function downloadUrl(url,callback) { var request = window.ActiveXObject ? new ActiveXObject('Microsoft.XMLHTTP') : new XMLHttpRequest; request.onreadystatechange = function() { if (request.readyState == 4) { request.onreadystatechange = doNothing; callback(request, request.status); } }; request.open('GET', url, true); request.send(null); } downloadUrl("http://www.yourserver.com/page.aspx", function(data) { var xml = data.responseXML; var markers = xml.documentElement.getElementsByTagName("marker"); for (var i = 0; i < markers.length; i++) { var name = markers[i].getAttribute("name"); var address = markers[i].getAttribute("address"); var Nat= markers[i].getAttribute("Nationality"); var point = new google.maps.LatLng( parseFloat(markers[i].getAttribute("lat")), parseFloat(markers[i].getAttribute("lng"))); var html = "<b>" + name + "</b> <br/>" + address; var icon = customIcons[Nat] || {}; var marker = new google.maps.Marker({ map: map, position: point, icon: icon.icon, shadow: icon.shadow }); bindInfoWindow(marker, map, infoWindow, html); } }); // and customs icons var customIcons = { US: { icon: 'http://url.com/us.flag.png', shadow: 'http://url.com/shadow.png' }, FR: { icon: 'http://url.com/french.flag.png', shadow: 'http://url.com/shadow.png' } };hope this help you 😉
March 13, 2013 at 10:50 am #336598
zenjaMemberthanks man, im gonna look into this, hope my small head can cope… 😉
Also @ octavio
Ive been thinking about the layout, basically all i need is a to go to a google map (or other DB map like yann suggested) being centered at the current location of the user and the destinations also being in the map, so the user themselves can choose the desired location. (it would be nice to include a route to option i think…)Any thought on that?
Thanks guys, i appreciate the help.
Zenja
-
AuthorPosts
