Load google map based on users choice -> loaded from external XML -> displayed on map.
3 replies, posted
Hey, so situation is:
I have an external XML file, in which I can fetch specific information using keywords like where and what.
It's a local API from City Council (Dublin/Ireland) which contains all official gov run companies (libraries, schools, service stations etc..) queries look like:
[URL="http://www.dublincity.ie?action=getqueries&what=schools&where=dublin8"]www.dublincity.ie?action=getqueries&what=schools&where=dublin8[/URL]
So that tells to fetch all schools from area of Dublin 8.
Now I need to have a google maps loaded, and basically on side have tick boxes saying:
Schools, Emergency Stations, Libraries etc.. and when user ticks multiple boxes and clicks button called "Filter/Refresh/Refine" it will reload map and show markers only of those.
By the way, the longitute and latitude is stored as attribute, here is the returned data for libraries in Dublin 8.
[URL=http://s411.photobucket.com/user/arleitiss/media/Untitled_zpse2f61bd5.png.html][IMG]http://i411.photobucket.com/albums/pp196/arleitiss/Untitled_zpse2f61bd5.png[/IMG][/URL]
Are you reloading the page or is this with an Ajax request?
[QUOTE=Epiclulz762;41420197]Are you reloading the page or is this with an Ajax request?[/QUOTE]
Well, either way will work, but I am not familiar with Ajax much, more with php.
If you are not using JavaScript or AJAX then you may have to embed Google's map application onto your page with the latitude and longitude as variables.
[editline]12th July 2013[/editline]
Otherwise include the map application onto your page and call the coordinates or addresses whenever the user specifies with an AJAX call.
I have never had a Google API key nor have I ever used their API, this is simply my approach.
[editline]12th July 2013[/editline]
You may be interested in [URL=http://developers.google.com/maps/documentation/geocoding/]this[/URL] as well, where it discusses positioning the map plugin.
Sorry, you need to Log In to post a reply to this thread.