markerclusterer

Google Maps markerClusterer + InfoBubble - selectively display or hide based on cluster true or false

北城以北 提交于 2019-12-11 21:23:53
问题 I have markerCluster working fine with InfoBubbles (a utility for gmaps v3). It looks like this: Last little improvement here is to make the infoBubbles disappear IF the markers have been clustered. You can see the (3) in the image and you see some phantom infoBubbles floating nearby but no markers underneath them. The code says: infoBubble[i] = new InfoBubble({ content: '<div id="msg" class="map-text" style="font-size:13px">'+res[i].job.start_time+" -"+res[i].job.end_time+'</div>',

google map cluster and richmarker

戏子无情 提交于 2019-12-11 20:12:47
问题 The question is about google map's cluster and richmarker on ruby on rails Recently I am developing a web application with Ruby on Rails, I found a vital problem yesterday, here is my javascript: //Build initialize Gmap and build markers on it //initialize array var map_infos = []; //receive marker data from controller map_infos = gon.map_infos; function initialize() { var mapOptions = { zoom: 8, center: new google.maps.LatLng(25.026, 121.523) }; var map = new google.maps.Map(document

Change multi size icon cluster to single icon

穿精又带淫゛_ 提交于 2019-12-11 18:29:47
问题 pro. What this expression use for => this.sizes = [53, 56, 66, 78, 90];? I found it from markercluster.js. If I want to limit only 100 markers appear on map for every time the map load/ or onchange the zooming map, does it mean I need to change to => this.sizes = [100]? And how to change cluster icon outside ClusterMarker.js? Based on default, cluster icon will change according cluster size. How to make the cluster icon constant and without showing the number of total marker in it? Sorry

Custom Markers disappear on zoomin the map and appear on zoomout the map with Clustering

試著忘記壹切 提交于 2019-12-11 06:32:06
问题 I have load multiple pins in GoogleMap with clustering and below is my code. Link : https://github.com/googlemaps/google-maps-ios-utils/issues/235 func initializeClusterItems() { let iconGenerator = GMUDefaultClusterIconGenerator() let algorithm = GMUNonHierarchicalDistanceBasedAlgorithm() let renderer = GMUDefaultClusterRenderer(mapView: mapView, clusterIconGenerator: iconGenerator) renderer.delegate = self clusterManager = GMUClusterManager(map: mapView, algorithm: algorithm, renderer:

ClusterMarkerer - no cluster appear - this.map_.mapTypes[this.map_.getMapTypeId()] is undefined markerclusterer.js:304

白昼怎懂夜的黑 提交于 2019-12-11 02:32:11
问题 I have an issue with my MarkerClusterer. When i was 400 markers, cluster appears, all worked. But now i have moire than 600 markers and cluster don't appear. Firebug display this error: that.map_.mapTypes[that.map_.getMapTypeId()] is undefined markerclusterer.js:304 Have you an idea? Thanks 回答1: the best solution is switching to api 3.5 waiting a fix by google. <script type="text/javascript" src="http://maps.google.com/maps/api/js?v=3.5&sensor=true"></script> 回答2: Update your markercluster.js

How can I hide infowindow on markers which are inside marker cluster

為{幸葍}努か 提交于 2019-12-11 02:08:09
问题 I am having few markers which have infowindow and markerclusters. I want to hide the infoWindow of the markers when they become part of marker clusters in the map and show tem when they are actually shown individually rather than in a cluster. The code for markers and infowindow is something like: var marker = new google.maps.Marker({ position: new google.maps.LatLng(locations[i][1], locations[i][2]), map: map, ... }); var myOptions = { ....... }; infowindow = new InfoBox(myOptions);

Marker Clusterer Plus change icon on hover

可紊 提交于 2019-12-10 17:14:34
问题 How can I dynamically change the Icon used for a specific Cluster in Marker Clusterer Plus for Google Maps V3? The markers do not seem to expose any methods at all to modify them. I need to do something like this (or equivalent). google.maps.event.addListener(markerCluster, "mouseover", function (cluster) { cluster.setIcon(hoverIcon); }); google.maps.event.addListener(markerCluster, "mouseout", function (cluster) { cluster.setIcon(normalIcon); }); 回答1: There is a reference to the div-element

Markerclusterer set marker cluster icon depending on markers inside it

♀尐吖头ヾ 提交于 2019-12-10 15:08:53
问题 Let's say that I want to make a webpage that will show approximate number of free parking spots left on each parking(due to confidentiality I'm not allowed to give any details of what I'm actually doing). For this I'm using Google maps and Markerclusterer . So for parking with less than 5% spots left I'd like to show a red marker, for parkings with 5%-25% spots I'd show a yellow one and for ones with more than 25% free spots I want to make it green. So far I could make those markers and

Google Maps JavaScript API v3 / Data Layer / MarkerClusterer

非 Y 不嫁゛ 提交于 2019-12-09 01:04:14
问题 Can you help me please to create marker cluster with MarkerClustererPlus. I load the data with: layer = map.data.loadGeoJson('resources/data.geojson'); and the markers are visible, but i have not idea how to create markercluster. Do i have to parse the data.geojson-file into an array? Thanks. function initialize() { map = new google.maps.Map(document.getElementById('map'), mapOptions); layer = map.data.loadGeoJson('resources/data.geojson'); map.data.setStyle({icon: icon}); map.data

Object has no method 'getPosition' when clustering Google map markers (api v3)

旧街凉风 提交于 2019-12-08 18:25:35
问题 I'm trying out a basic implementation of clustering markers on a Google map using the Google Maps Utility Library v3. When I run this though, I get an error on the Chrome Developer Tools console: Uncaught TypeError: Object #<Object> has no method 'getPosition' This relates to line 649 in the utility library script here: http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/src/markerclusterer.js. Which is the following function: /** * Determins if a marker is