# Enhanced MarkerClusterer [![Build Status](https://travis-ci.org/sktivd/e_markerclusterer.svg?branch=master)](https://travis-ci.org/sktivd/e_markerclusterer) [![Gem Version](https://badge.fury.io/rb/e_markerclusterer.png)](http://badge.fury.io/rb/e_markerclusterer) Welcome to e_markerclusterer gem! This gem is a javascript to show various infographics on Google Map, which is based on [Marker Clusterer Plus of Google Map Utilities V3](https://github.com/printercu/google-maps-utility-library-v3-read-only/tree/master/markerclustererplus) and infographic charts is derived from [Chart Marker Clusterer by Hassan Mughal](https://github.com/hassanlatif/chart-marker-clusterer). ## Requirement 1) Gemfile Add this line to your application's Gemfile: ``` gem 'e_markerclusterer' ``` 2) Replace Google Marker Clusterer Replace below google script Remove the line ``` ``` on your dom, and add this line on asset pipeline: ``` \\= require e_markerclusterer ``` If you use [Google maps for Rails](https://github.com/apneadiving/Google-Maps-for-Rails), add lines on asset pipeline: ``` \\= require e_markerclusterer \\= require gmaps/google ``` ## Usage e_markerclusterer gem basically works with Google maps for Rails. Only one difference is legend information. 1) GeoJSON: If you generate markers with sex legend, you should set title of markers for legend. ``` @users = User.all @markers = Gmaps4rails.build_markers(@users) do |user, marker| marker.title user.sex marker.lat user.latitude marker.lng user.longitude end @legend = { 'male' => 1, 'female' => 2} ``` 2) HTML view: ```