markerclusterer

Styling MarkerClusterer Icons?

喜夏-厌秋 提交于 2019-12-02 16:59:35
I am using the MarkerCluster.js to create clustering in my google maps api. The clusters work how I want them however I want to style differently than yellow, blue and red circles. I was trying to use the MarkerStyleOptions and it says you have an array of styles with the smallest cluster icon first and the biggest last. I tried to create this below but I am getting really confused about what syntax to use and can't find any good examples. var clusterStyles = [ [opt_textColor: 'white'], [opt_textColor: 'white'], [opt_textColor: 'white'] ]; var mcOptions = { gridSize: 50, styles: clusterStyles,

How to apply leaflet marker cluster using layers

穿精又带淫゛_ 提交于 2019-12-02 15:42:45
问题 I´m trying to apply the Leaflet.MarkerCluster.LayerSupport. But I don´t know how to use it :( I´ve already read the documentation about but and I tried many times but it doesen´t work. This is my code <!DOCTYPE html> <html> <head> <title>Península</title> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.css" /> </head> <body> <div id="map" style="width: 600px; height:

How can I find the center of a cluster of data points?

拈花ヽ惹草 提交于 2019-12-02 15:10:51
Let's say I plotted the position of a helicopter every day for the past year and came up with the following map: Any human looking at this would be able to tell me that this helicopter is based out of Chicago. How can I find the same result in code? I'm looking for something like this: $geoCodeArray = array([GET=http://pastebin.com/grVsbgL9]); function findHome($geoCodeArray) { // magic return $geoCode; } Ultimately generating something like this: UPDATE: Sample Dataset Here's a map with a sample dataset: http://batchgeo.com/map/c3676fe29985f00e1605cd4f86920179 Here's a pastebin of 150

Markers Created via JSON Are Not Clustering with Google Maps MarkerClusterer

China☆狼群 提交于 2019-12-02 14:43:17
问题 I'm having trouble getting the Google Maps MarkerClusterer to work. I'm fairly sure I follow procedure correctly (i.e. creating the map, adding markers to an array, not setting the markers to a map, and then attaching the map and the markers to a MarkerClusterer), which leads me to believe maybe it has to do something with Google Maps v3 versus v2. I'm just creating markers from a json file and than filtering the markers based off of user input. Quick note: When I add a map to the marker all

Markers Created via JSON Are Not Clustering with Google Maps MarkerClusterer

吃可爱长大的小学妹 提交于 2019-12-02 09:44:20
I'm having trouble getting the Google Maps MarkerClusterer to work. I'm fairly sure I follow procedure correctly (i.e. creating the map, adding markers to an array, not setting the markers to a map, and then attaching the map and the markers to a MarkerClusterer), which leads me to believe maybe it has to do something with Google Maps v3 versus v2. I'm just creating markers from a json file and than filtering the markers based off of user input. Quick note: When I add a map to the marker all the markers show up, but they just aren't clustered. $('document').ready(function() { $('#map').height(

How to apply leaflet marker cluster using layers

给你一囗甜甜゛ 提交于 2019-12-02 09:15:57
I´m trying to apply the Leaflet.MarkerCluster.LayerSupport . But I don´t know how to use it :( I´ve already read the documentation about but and I tried many times but it doesen´t work. This is my code <!DOCTYPE html> <html> <head> <title>Península</title> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.css" /> </head> <body> <div id="map" style="width: 600px; height: 400px"></div> <script src="http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.js"></script> <script src=

Any change in zoom level causes all my markers to re-appear on my Google map

痞子三分冷 提交于 2019-12-02 07:24:26
问题 Any change in zoom level causes all markers to appear on the map that have been on the map at any time since the last page load. This is true whether the zoom level change is due to a setZoom() call in my code or because I operate the zoom slider. I have a map control widget with buttons to add markers that correspond to different categories. So you click the button for Groups and the map populates with markers that represent Groups. Then you click on the Individuals button and the Groups

Map clustering - max zoom markers still clustered

谁都会走 提交于 2019-12-01 20:46:05
问题 I'm using android maps utils for clustering the markers on google maps api v2. It worked fine, but when I added 2000+ markers, on max zoom it is still clustered (markers still have numbers): Here is my method for filling map with markers: public void getRiverData(String state, String type) { URL = getResources().getString(R.string.base_url) + state + "/" + type + getResources().getString(R.string.end_url); SimpleXmlRequest<XMLData> simpleRequest = new SimpleXmlRequest<XMLData>( URL, XMLData

Maps API v3 clustering at different zoom levels

a 夏天 提交于 2019-12-01 20:21:56
问题 I am working on a map project where I need clustering. I implemented a store locator and used MarkerClusterer which works fine. Now I have another requirement from the customer and I wonder which solution I should use to achieve these goals: Zoom level 0: Cluster markers within 1500km distance to each other Zoom level 1: Cluster within 1000km Zoom level 2: Cluster within 750km Zoom level 3: Cluster within 400km Zoom level 4 and above: no clustering I was thinking I should be using

Maps API v3 clustering at different zoom levels

…衆ロ難τιáo~ 提交于 2019-12-01 19:43:01
I am working on a map project where I need clustering. I implemented a store locator and used MarkerClusterer which works fine. Now I have another requirement from the customer and I wonder which solution I should use to achieve these goals: Zoom level 0: Cluster markers within 1500km distance to each other Zoom level 1: Cluster within 1000km Zoom level 2: Cluster within 750km Zoom level 3: Cluster within 400km Zoom level 4 and above: no clustering I was thinking I should be using MarkerManager and MarkerClusterer together, but I am not sure about that. Any help to get me on the right path?