d-armandoC / google-maps-utility-library-v3

Automatically exported from code.google.com/p/google-maps-utility-library-v3
Apache License 2.0
0 stars 0 forks source link

Marker cluserers do no display in earth view #158

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Demo link or sample code:
<!DOCTYPE html>
<style>
body { height: 512px; margin: 0; }
#map { height: 100%; width: 100%; }
#version-example { color: #ffffff; }
</style>

<div id="map"></div>
<p id="version-example">Maps API version: <span id="version"></span></p>

<script src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script src="https://www.google.com/jsapi"></script>
<script type="text/javascript" 
src="http://google-maps-utility-library-v3.googlecode.com/svn/trunk//markerclust
erer/src/markerclusterer.js"></script>
<script type="text/javascript" 
src="http://google-maps-utility-library-v3.googlecode.com/svn/trunk/googleearth/
src/googleearth-compiled.js"></script>
<script>google.load('earth', '1');</script>

<script>

      google.load('earth', '1');
      var map;
      var googleEarth;
      function init() {
        map = new google.maps.Map(document.getElementById('map'), {
          zoom: 16,
          center: new google.maps.LatLng(50.06672668457031,-122.9518051147461),
          mapTypeId: google.maps.MapTypeId.ROADMAP
        });

        googleEarth = new GoogleEarth(map);

        google.maps.event.addListenerOnce(map, 'tilesloaded', addOverlays);
      }

      function getRandomLatLng() {
        var bounds = map.getBounds();
        var southWest = bounds.getSouthWest();
        var northEast = bounds.getNorthEast();
        var lngSpan = northEast.lng() - southWest.lng();
        var latSpan = northEast.lat() - southWest.lat();
        var latLng = new google.maps.LatLng(
            southWest.lat() + latSpan * Math.random(),
            southWest.lng() + lngSpan * Math.random());
        return latLng;
      }

      function addOverlays() {
        // Add some markers

        var markers = [];
        for (var i = 0; i < 5; i++) {
          var marker = new google.maps.Marker({
            position: getRandomLatLng(),
            draggable : true,
            title : 'this is a marker',
            icon : 'http://code.google.com/apis/maps/documentation/javascript/examples/images/beachflag.png'
          });
          markers.push(marker);
        }
        var mc = new MarkerClusterer(map, markers);
        mc.setMap(map);
      }

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

What steps will reproduce the problem?
1. Build a map with a marker cluseterer and google maps view
2. View in satilite view
3. Switch to earth view

Expected result:
The marker clusterer should be viewable in the earth view

Actual result:
The marker clusterer disappears and only the markers that were visible are now 
visible in the earth view

Version: 2.0.8

Browser / Operating System:
[e.g. FF3 / MacOSX]

Additional comments:
[Enter any additional comments about the bug here.]

*********************************************************
Tip: Star this issue (next to title) to receive notifications of status
changes against this issue, also used as a gauge for how many people are
interested in seeing it resolved.
*********************************************************

Original issue reported on code.google.com by ana...@gmail.com on 17 Feb 2012 at 6:25

GoogleCodeExporter commented 9 years ago
Has this issue been resolved yet? I still have the same problem as described 
above

Original comment by TheChaos...@gmail.com on 25 Jul 2013 at 7:44