javascript - Creating a link to a certain marker on a google map -


I use this example to implement a Google Maps Store Locator:

It works fine But I'm trying to show in the list instead of the drop down list in the actual ul I've changed the results to show the result as li but I Link can not be found to work

It is currently linked to the selected option in the dropdown, but I Instead every li links I want to make it requires a little change I:

  function load () {map = new google.maps.Map (document.getElementById ( "map"), {center: new google.maps lots Long (53.438065, -1.823730), Zoom 4, map Taipiid 'roadmap' map type Kantrolopts: {style: google.maps.MapTypeControlStyle.DROPDOWN_MENU}}); InfoWindow = new google.maps.InfoWindow (); Choose Location = Document. GetElementById ("Choose Location"); LocationSelect.onchange = function () {var markerNum = locationSelect.options [locationSelect.selectedIndex] .value; If (MarkerNum! = "None") {google.maps.event.trigger (marker [markmarknum], 'click'); }}; } Function search location () {var address = document.getElementById ("addressInput"). Values; Var Geocoder = new google.maps.Geocoder (); Geocoderkgeocode (address {Address}, function (result, status) {if (state == google.maps.GeocoderStatus.OK) {searchLocationsNear (results [0] .geometry.location);} and {alert (n + ' did not get'); } }); }    

Then you can add click events to all Lee items and pass the marker number in it you can click on this kind of event:

  select the function markers (markers New) {google.maps.event.trigger (marker [Markrnm], "click") are; };   

This selection maker should apply to all Li to make it work.

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -