javascript - Google maps show and hide markers using checkboxes -
how show , hide markers using javascript , google maps?
i use checkboxes show , hide markers, @ minute have 2 markers , 3 checkboxes. 1 show , hide , others show , hide each marker. not sure how connect them checkboxes , show/hide them respectively.
sample of marker using:
var jorvik = createmarker({ position: {lat: 53.95697, lng: -1.08100}, map: map, icon: 'https://developers.google.com/maps/documentation/javascript/examples/full/images/beachflag.png'}, "<h1>jorvik viking centre</h1><p>this home marker.<br/>test</p>");
you can use setvisible(true/false)
method markers working fiddle
see togglegroup() function
Comments
Post a Comment