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

  • SEARCH
  • Home
  • 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 6999927
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:36:18+00:00 2026-05-27T20:36:18+00:00

I would use MarkerManager to group neighboring marker in one, I tested an example

  • 0

I would use MarkerManager to group neighboring marker in one, I tested an example but it does not work. Different markers are displayed well, but they are not together when they should. The manager is not working as it should, I do not understand why.

<html>
<head>
    <title>Test GMap - MarkerManager</title>
    <script src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
    <script src="http://google-maps-utility-library-v3.googlecode.com/svn/tags/markermanager/1.0/src/markermanager.js"></script>
    <script src="http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/src/markerclusterer_compiled.js"></script>
</head>

<body>
    <div id="my-map" style="width:100%;height:700px"></div>
    <script>
        var maCarte = '';
        function initialisation(){
            var centreCarte = new google.maps.LatLng(47.389982, 0.688877);
            var optionsCarte = {
                        zoom: 5,
                        center: centreCarte,
                        mapTypeId: google.maps.MapTypeId.ROADMAP
                    }
            maCarte = new google.maps.Map(document.getElementById("my-map"), optionsCarte);
            // Create a new instance of the MarkerManager
            var mgr = new MarkerManager(maCarte);
            google.maps.event.addListener(mgr, 'loaded', function() {
                console.log('loaded Map');
                // Create marker array
                var markers = [];
                // Loop to create markers and adding them to the MarkerManager
                for(var i = 0; i < 50; i += 0.1) {
                    var marker = new google.maps.Marker({position: new google.maps.LatLng(47.389982 + i, 0.688877 + i)});
                    markers.push(marker);
                }
                //var markerCluster = new MarkerClusterer(map, markers);
                // Add the array to the MarkerManager
                mgr.addMarkers(markers, 8);
                // Refresh the MarkerManager to make the markers appear on the map
                mgr.refresh();
            });
        }

        google.maps.event.addDomListener(window, 'load', initialisation); 
    </script>
</body>

Can someone help me?

thank you very much

  • 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-27T20:36:19+00:00Added an answer on May 27, 2026 at 8:36 pm

    Your page works for me, but the markers are not immediately visible when the page loads. This is because of the zoom setting you have on line 34:

    mgr.addMarkers(markers, 8);
    

    if you set that to a lower number (say, 4) the markers will be visible when zoomed further out.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For one domain I would use this RewriteCond %{HTTP_HOST} . RewriteCond %{HTTP_HOST} !^example-domain-please-change\.com [NC]
I would use one of the readily available jQuery plugins, but none of them
Why one would use one of the following packages instead of the other? Java
I would use an expression like this $(a[href*='2']).offset().left but for iframe's elements ... I
I would use hg4idea to do this but it seems to leak memory badly.
normally I would use Python/Perl for this procedure but I find myself (for political
To get field names one would use the command: select column_name from information_schema.columns where
What are the scenarios when one would use a Monostate pattern instead of singleton
I had thought I would use curl for this but it looks like I
I would like to use some of the functionality of iOS5 but still build

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.