Home › Forums › JavaScript › Google Maps store locator library for api v3 – fusion tables?
- This topic is empty.
-
AuthorPosts
-
December 31, 2012 at 4:59 pm #41695chrandersonMember
hi,
I would like to utilize the store locator library that google has [published](http://storelocator.googlecode.com/git/index.html “library”) for google maps api v3. I have not found much documentation or any tutorials on how to implement my own data. They have a [reference page](http://storelocator.googlecode.com/git/reference.html “reference documentation”), but it does not show me how i can use other sources. I am pretty new to javascript so i might be missing something. I see in the examples that i can plug data in from the source of my choosing, but only see them using a csv file in the examples. I would like to use fusion tables so i can enter more location markers in the future via a google form. Do you have any idea or know of any tutorials that would help me figure it out? Also, if you have any thoughts on my way of building a store locator for a website, i am all ears.
thanks!
Chris
December 31, 2012 at 8:33 pm #119518JamesParticipantI know it’s not what you’re quite looking for, but here’s a really easy way to add as many points necessary by just using Google’s API in Javascript. You can easily get the co-ordinates from the web too.
jQuery:
// initialize your map as normal
var options = {
center: new google.maps.LatLng(55.378051, -3.435973),
mapTypeId: google.maps.MapTypeId.ROADMAP,
zoom: 5
};
var map = new google.maps.Map(document.getElementById('map'), options);
var coords = [
[54.97784, -1.612916],
[55.378051, -3.435973],
[58.97784, -1.612916],
[53.97784, 2.612916],
// Add additional co-ordinates as needed.
];
for (var i = 0; i < coords.length; i++) {
(function(coord) {
var latLng = new google.maps.LatLng(coord[0], coord[1]);
var marker = new google.maps.Marker({
position: latLng,
map: map
});
})(coords);
};
December 31, 2012 at 9:48 pm #119521chrandersonMemberJames,
I appreciate that. I am at the point where i can do that, but I would like to go the extra mile to set this up so other people that are not computer saavy can input data with a form. The data rows will have a good amount of fields and images as well.
-
AuthorPosts
- The forum ‘JavaScript’ is closed to new topics and replies.