markerclusterer

How to hide and show MarkerClusterer in google maps

谁都会走 提交于 2019-11-29 10:01:59
问题 i'm trying to hide/show markerClusterer when user clicks some buttons: Here is what i'm trying to do: map = new google.maps.Map(document.getElementById("mappa"),mapOptions); var marker_tmp = []; var markers_tmp = []; $.each(json,function(index,value){ var latLng = new google.maps.LatLng(value.lat,value.lng); var marker = new google.maps.Marker({'position': latLng}); if((value.candidato in markers_tmp)==false){ markers_tmp[value.name]=[]; } markers_tmp[value.name].push(marker); }); for(var

Google Maps V3 rendering over 1 million markers (in a reasonable time)

雨燕双飞 提交于 2019-11-29 02:56:45
问题 I have recently created a Google Map using V3 of the API (latest version). One of my requirements is that I am able to render over 1 million markers (in a reasonable time). A reasonable time would be under 15 seconds. I know that it is fairly crazy to render all 1 million markers at once which is why I have investigated performance options. One of the options I came across and utilized is the MarkerClusterer: https://developers.google.com/maps/articles/toomanymarkers However, I am now

Custom Marker using GMUClusterManager

做~自己de王妃 提交于 2019-11-29 02:04:44
I want to display Custom marker using GMUClusterManager . I followed all steps for marker clustering here . but there is blue and red color Icon like this. But when I Zoom in that map it display only red color Marker but I don't want that. there is instance method where I have implemented my logic but no use. - (instancetype)initWithMapView:(GMSMapView *)mapView clusterIconGenerator:(id<GMUClusterIconGenerator>)iconGenerator { if ((self = [super init])) { GMSMarker *marker= [GMSMarker markerWithPosition:CLLocationCoordinate2DMake(24.0, 75.30)]; UIView *customMarker =[[UIView alloc]

Google Maps Api v3 - how to remove cluster icons?

我们两清 提交于 2019-11-29 01:16:48
how can i remove all cluster icons (cluster markers) from map? tryed with advices like: Google Maps API v3: How to remove all markers? ... but it did not worked. can you help me how to achieve that? thank you in advance! UPDATE (2010-11-23) markers are stored in array with var markersClust = Array(); ... and are added with (combination with php): markersClust.push(marker_<?php echo $team["Team"]["id"]; ?>); var markerClusterer = new MarkerClusterer(MyMap.map, markersClust, clusterOptions); and it works fine. but, i can not remove them from a map, and it drives me... tryed to remove markers

google maps api v3 + infoBubble in markerClusterer

我的梦境 提交于 2019-11-29 00:28:53
I was trying to add an infoBubble to a markerCluster in the 'clusterclick' event but the infoBubble.Open method ask for a 'marker' parameter to bind with. The problem is that a markerCluster is not a google.maps.Point so it's not posible to bind the infoBubble to it. I assigned the possition of the markerCluster to the infoBubble but the infoBubble redraws in the new position moving the marker from its possition. Has anyone had the same problem? Is there a solution without modifing the original infoBubble code? http://google-maps-utility-library-v3.googlecode.com/svn/trunk/infobubble/ Solution

How to set my own icon for markers in clusterer in Google Maps

匆匆过客 提交于 2019-11-28 22:54:03
问题 I'm using GoogleMaps clustering. I have 4 different types of markers, each extends from one abstract class, each has its owm icon and it defined in MarkerOptions field. I use ClusterManager for this abstract class. When I just use //marker is instance of one of extended classes and has abstract class type clusterManager.addItem(marker); After clustering it sets icon to default. How I can fix this? I was trying to use something like this: //marker is abstract marker, getMarker returns the

Android maps utils cluster icon color

蹲街弑〆低调 提交于 2019-11-28 18:22:47
Is there any method to change the background color of the cluster item? (the one that displays the count of the markers, like 100+, 200+ ...). I tried to look into the source code of the ClusterManager but could not find any option to change the color, but maybe someone here knows how to do that. I basically want to "materialify" those colors a bit. I was able to get a rough implementation working by using this demo from the library samples as a guide. I used the lens icon from the Material Design Icons from here . After downloading the lens zip I put ic_lens_black_24dp.png under the drawable

Integrating Spiderfier JS into markerClusterer V3 to explode multi-markers with exact same long / lat

倾然丶 夕夏残阳落幕 提交于 2019-11-28 17:11:59
问题 I am using markerCLusterer V3 on a db file from Filemaker to generate a (semi-live) map of current delivery locations, based off of addresses. Grabbing the lat/long from Google and populating those fields is no problem. Generating the map via markerClusterer is no problem. I am even hosting the JS locally so that I can change the maxZoom variable to break the clusters apart above max zoom, so that I can see multiple markers. However, with the markers at exactly the same lat / long, I can only

Cluster markers in Google Maps Android v2

六眼飞鱼酱① 提交于 2019-11-28 16:52:38
问题 I have to place different markers on a GoogleMap from the Google Maps Android v2 API. The problem is that multiple markers are set to the same position (lat/lng), so the user only sees the "newest" marker. Is there a possibility (in the best case: a library) that clusters different markers from the same area (in relation to the zoomlevel)? I've already read about the MarkerClusterer , but this is designed for the JavaScript API. 回答1: Google has provided a utility to do this as part of their

Google Maps Api v3, custom Cluster icon

微笑、不失礼 提交于 2019-11-28 16:51:21
how can i change cluster icon? i wolud like to have same icon, with some other color than blue. You need to use styles parameter when initializing MarkerClusterer object - the code below shows default styles so if you want to recolour one of the icons just change the relevant url to your image... //set style options for marker clusters (these are the default styles) mcOptions = {styles: [{ height: 53, url: "http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/images/m1.png", width: 53 }, { height: 56, url: "https://github.com/googlemaps/js-marker-clusterer/tree/gh