/src/com/google/maps/extras/markerclusterer/UnitMarker.as
ActionScript | 63 lines | 14 code | 4 blank | 45 comment | 0 complexity | bbfd124294a6e67d3f388d1b3da7a1d0 MD5 | raw file
1/** 2 * @name MarkerClusterer for Flash 3 * @version 1.0 4 * @author Xiaoxi Wu 5 * @copyright (c) 2009 Xiaoxi Wu 6 * @fileoverview 7 * Ported from Javascript to Actionscript 3 by Sean Toru 8 * Ported for use in Flex (removal of fl. libraries) by Ian Watkins 9 * Reflectored for both Flash and Flex, 10 * and maintained by Juguang XIAO (juguang@gmail.com) 11 * 12 * This actionscript library creates and manages per-zoom-level 13 * clusters for large amounts of markers (hundreds or thousands). 14 * This library was inspired by the <a href="http://www.maptimize.com"> 15 * Maptimize</a> hosted clustering solution. 16 * <br /><br/> 17 * <b>How it works</b>:<br/> 18 * The <code>MarkerClusterer</code> will group markers into clusters according to 19 * their distance from a cluster's center. When a marker is added, 20 * the marker cluster will find a position in all the clusters, and 21 * if it fails to find one, it will create a new cluster with the marker. 22 * The number of markers in a cluster will be displayed 23 * on the cluster marker. When the map viewport changes, 24 * <code>MarkerClusterer</code> will destroy the clusters in the viewport 25 * and regroup them into new clusters. 26 * 27 */ 28 29/* 30 * Licensed under the Apache License, Version 2.0 (the "License"); 31 * you may not use this file except in compliance with the License. 32 * You may obtain a copy of the License at 33 * 34 * http://www.apache.org/licenses/LICENSE-2.0 35 * 36 * Unless required by applicable law or agreed to in writing, software 37 * distributed under the License is distributed on an "AS IS" BASIS, 38 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 39 * See the License for the specific language governing permissions and 40 * limitations under the License. 41 */ 42 43 44package com.google.maps.extras.markerclusterer 45{ 46import com.google.maps.overlays.Marker; 47import com.google.maps.LatLng; 48import com.google.maps.overlays.MarkerOptions; 49/** 50 * This class extends Marker, with only one additional property added that is Boolean type <code>isAdded</code>, 51 * indicating whethe the unit/individual marker has been added into Cluster. 52 * Normally, you as a developer should not concern or use this property. 53 */ 54public class UnitMarker extends Marker 55{ 56 internal var isAdded : Boolean; 57 58 public function UnitMarker(latLng : LatLng, options : MarkerOptions = undefined) 59 { 60 super(latLng, options); 61 } 62} 63}