leaflet.markercluster - Leaflet markercluster rails not displaying marker -


i not graphic markercluster, number. suspect css missing, not sure i'm doing wrong. no errors in console, , everythings works ok without markercluster.

gemfile

source 'https://rubygems.org'  # bundle edge rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '4.2.5.1' # use postgresql database active record gem 'pg', '~> 0.15' # use scss stylesheets gem 'sass-rails', '~> 5.0' # use uglifier compressor javascript assets gem 'uglifier', '>= 1.3.0' # use coffeescript .coffee assets , views gem 'coffee-rails', '~> 4.1.0' # see https://github.com/rails/execjs#readme more supported runtimes # gem 'therubyracer', platforms: :ruby  # use jquery javascript library gem 'jquery-rails' # turbolinks makes following links in web application faster. read more: https://github.com/rails/turbolinks gem 'turbolinks' # build json apis ease. read more: https://github.com/rails/jbuilder gem 'jbuilder', '~> 2.0' # bundle exec rake doc:rails generates api under doc/api. gem 'sdoc', '~> 0.4.0', group: :doc  # use activemodel has_secure_password # gem 'bcrypt', '~> 3.1.7'  # use unicorn app server # gem 'unicorn'  # use capistrano deployment # gem 'capistrano-rails', group: :development  group :development, :test   # call 'byebug' anywhere in code stop execution , debugger console   gem 'byebug' end  group :development   # access irb console on exception pages or using <%= console %> in views   gem 'web-console', '~> 2.0' end  # windows not include zoneinfo files, bundle tzinfo-data gem gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]  gem 'activerecord-postgis-adapter' gem 'leaflet-rails' gem 'leaflet-markercluster-rails' gem 'gon' 

application.js

//= require jquery //= require jquery_ujs //= require turbolinks //= require leaflet //= require leaflet-google //= require leaflet.markercluster //= require_tree 

application.css

 *= require leaflet  *= require leaflet.markercluster  *= require leaflet.markercluster.default  *= require_tree .  *= require_self 

coffeescript

$ ->     map = l.map("mapid").setview([47.6345153, -122.3208297], 18)     map.options.maxzoom = 22     map.options.bounceatzoomlimits = true     googlelayer = new l.google("roadmap")     map.addlayer googlelayer     markers = l.markerclustergroup()      in[0...10]         markers.addlayer l.marker([47.6345 + (math.random() / 2000), -122.3208 + (math.random() / 2000)])     markers.refreshclusters     map.addlayer markers 

any wonderful.

sample of google map leaflet markerclusters not working

as turned out leaflet-markercluster-rails using code leaflet-markercluster 0.4, not more current 0.7. can tell, that's root of entire problem. :)


Comments

Popular posts from this blog

unity3d - Rotate an object to face an opposite direction -

angular - Is it possible to get native element for formControl? -

javascript - Why jQuery Select box change event is now working? -