Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7491955
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T16:12:08+00:00 2026-05-29T16:12:08+00:00

I like to hide/view a group of markers in a map with the plugin

  • 0

I like to hide/view a group of markers in a map with the plugin gomap() like here: http://www.pittss.lv/jquery/gomap/solutions/group.html

for now I realized it with hiding/viewing only one marker:

$(function() { 
    $("#map_canvas").goMap({
        latitude: 46.839, 
        longitude: 9.285, 
        zoom: 15 ,
        scaleControl: true,
        maptype: 'ROADMAP',
        markers: [{  
            latitude: 46.839, 
            longitude: 9.285,  
            id: 'biketour1', 
            group: 'bike',
            icon: 'pic/Kategorien/icon_bike.png', 
            html: { 
                content: 'Das ist die Biketour1', 
                popup:false
            }
        },{ 
            ...
            } 
        }], 
    }); 
    });

$("#bike-check").click(function() {  
        $.goMap.showHideMarker('bike');  
    });

Can you explain how I can realize the hiding/viewing for a group? I already tried it with class but this isn’t working…

update:

$(".parentcheck").click(function() { 
var group = $(this).attr("id");

switch (group) {
    case "bike-check":
        showhidemarker("bike");
    break;
    case "event-check":
        //and so on
    break;
}
});



/*! show / hiding markergroup
    *
    * @ groupid Group id string
    * @ true  Optional boolean to set the visibility to a specific value. If omitted, markers will toggle.
*/
function showhidemarker(groupid){
    for (var i in $.goMap.markers) {
        $.goMap.showHideMarker($.goMap.markers[i], false); 
        console.log("it works");
    }
    $.goMap.showHideMarkerByGroup(groupid, true);
}

here the html (by clicking on the checkbox, the markers should be visible or not)

...
    <ul>
      <li class="checkbox">
          <input id="bike-check" class="parentcheck" name="parentcheck" type="checkbox" checked="checked" value="Bike" />
          <p>Bike</p>
      </li>
      <li class="checkbox">
           <input id="event-check" class="parentcheck" type="checkbox" checked="checked" value="Events" />
           <p>Events</p>
       </li>
   </ul>
...

the problem is, that this method: $.goMap.showHideMarkerByGroup(groupid, true);
is not working as it should.

The marker from event dissapears by clicking on the checkbox for the bike – but by clicking on checkbox bike the marker from bike should dissappear!

What is wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T16:12:09+00:00Added an answer on May 29, 2026 at 4:12 pm

    got it 🙂

    var categories = {
            "bike-check": { 
                "groupID": "bike", 
                "isVisible": true
            },
            "event-check": {
                "groupID": "event", 
                "isVisible": true
            }
        };
    
    $(".parentcheck").click(function() { 
    
        var id = $(this).attr("id");
    
        categories[ id ].isVisible = !categories[ id ].isVisible;
        showhidemarker( categories[ id ].groupID,categories[ id ].isVisible  );
    
    });
    function showhidemarker(groupid,show){
        $.goMap.showHideMarkerByGroup(groupid, show)
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to hide any text matching a pattern from any HTML page,
I have a link like this: <a hreflang=15 class=comment-show-link href=>View/hide comments</a> And then have
I would like to create a tab view just by hide and show div
I would like to view/hide divs on a page, based on attribute filters. I've
I'm using jQuery to hide and show elements when a radio button group is
On details view, I would like to hide the new button. On page load
I am using HTML, and I'd like to hide the script tag from the
I would like to show / hide certain fields in my Drupal view based
How would I go about setting a link to perform certain functions like hide
I would like to hide all class=csc-content where previous sibling is a h4 class=faq.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.