blacklight-maps 0.3.3 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +2 -0
  3. data/.rubocop.yml +99 -0
  4. data/.solr_wrapper.yml +7 -0
  5. data/.travis.yml +19 -16
  6. data/Gemfile +40 -18
  7. data/README.md +22 -11
  8. data/Rakefile +35 -32
  9. data/app/assets/images/blacklight/maps.svg +1 -0
  10. data/app/assets/javascripts/blacklight-maps.js +1 -4
  11. data/app/assets/javascripts/blacklight-maps/blacklight-maps-browse.js +21 -11
  12. data/app/assets/stylesheets/blacklight_maps/{blacklight-maps.css.scss → blacklight-maps.scss} +1 -2
  13. data/app/assets/stylesheets/blacklight_maps/{default.css.scss → default.scss} +7 -10
  14. data/app/helpers/blacklight/blacklight_maps_helper_behavior.rb +81 -86
  15. data/app/helpers/blacklight_maps_helper.rb +2 -0
  16. data/app/views/catalog/_document_maps.html.erb +1 -1
  17. data/app/views/catalog/{_index_map.html.erb → _index_mapview.html.erb} +1 -1
  18. data/app/views/catalog/_show_maplet_default.html.erb +8 -9
  19. data/app/views/catalog/map.html.erb +2 -2
  20. data/blacklight-maps.gemspec +27 -26
  21. data/config/locales/blacklight-maps-zh.yml +20 -0
  22. data/config/locales/blacklight-maps.ar.yml +21 -0
  23. data/config/locales/blacklight-maps.de.yml +21 -0
  24. data/config/locales/blacklight-maps.en.yml +1 -1
  25. data/config/locales/blacklight-maps.es.yml +21 -0
  26. data/config/locales/blacklight-maps.fr.yml +20 -0
  27. data/config/locales/blacklight-maps.hu.yml +21 -0
  28. data/config/locales/blacklight-maps.it.yml +20 -0
  29. data/config/locales/blacklight-maps.nl.yml +21 -0
  30. data/config/locales/blacklight-maps.pt-BR.yml +21 -0
  31. data/config/locales/blacklight-maps.sq.yml +21 -0
  32. data/config/routes.rb +3 -2
  33. data/lib/blacklight/maps.rb +8 -14
  34. data/lib/blacklight/maps/controller.rb +27 -0
  35. data/lib/blacklight/maps/engine.rb +17 -19
  36. data/lib/blacklight/maps/export.rb +112 -93
  37. data/lib/blacklight/maps/geometry.rb +30 -18
  38. data/lib/blacklight/maps/maps_search_builder.rb +26 -0
  39. data/lib/blacklight/maps/render_constraints_override.rb +63 -30
  40. data/lib/blacklight/maps/version.rb +3 -1
  41. data/lib/generators/blacklight_maps/install_generator.rb +56 -13
  42. data/lib/generators/blacklight_maps/templates/search_history_controller.rb +7 -0
  43. data/{solr_conf → lib/generators/blacklight_maps/templates/solr}/conf/schema.xml +0 -0
  44. data/{solr_conf → lib/generators/blacklight_maps/templates/solr}/conf/solrconfig.xml +0 -0
  45. data/lib/railties/blacklight_maps.rake +13 -9
  46. data/spec/controllers/catalog_controller_spec.rb +20 -10
  47. data/spec/fixtures/sample_solr_documents.yml +955 -852
  48. data/spec/helpers/blacklight_maps_helper_spec.rb +61 -106
  49. data/spec/lib/blacklight/maps/export_spec.rb +109 -143
  50. data/spec/lib/blacklight/maps/geometry_spec.rb +34 -21
  51. data/spec/lib/blacklight/maps/maps_search_builder_spec.rb +42 -0
  52. data/spec/lib/blacklight/maps/render_constraints_override_spec.rb +42 -69
  53. data/spec/spec_helper.rb +19 -21
  54. data/spec/system/index_view_spec.rb +127 -0
  55. data/spec/system/initial_view_spec.rb +28 -0
  56. data/spec/system/map_view_spec.rb +50 -0
  57. data/spec/system/show_view_maplet_spec.rb +78 -0
  58. data/spec/test_app_templates/lib/generators/test_app_generator.rb +8 -14
  59. data/vendor/assets/images/layers-2x.png +0 -0
  60. data/vendor/assets/images/layers.png +0 -0
  61. data/vendor/assets/images/marker-icon-2x.png +0 -0
  62. data/vendor/assets/images/marker-icon.png +0 -0
  63. data/vendor/assets/images/marker-shadow.png +0 -0
  64. data/vendor/assets/javascripts/leaflet.js.erb +13922 -0
  65. data/vendor/assets/javascripts/leaflet.markercluster.js +3 -0
  66. data/vendor/assets/stylesheets/MarkerCluster.Default.css +60 -0
  67. data/vendor/assets/stylesheets/MarkerCluster.css +14 -0
  68. data/vendor/assets/stylesheets/leaflet.css +635 -0
  69. metadata +100 -89
  70. data/config/jetty.yml +0 -7
  71. data/lib/blacklight/maps/controller_override.rb +0 -33
  72. data/spec/features/initial_view_spec.rb +0 -21
  73. data/spec/features/maps_spec.rb +0 -252
  74. data/spec/lib/blacklight/maps/controller_override_spec.rb +0 -34
  75. data/spec/test_app_templates/Gemfile.extra +0 -5
@@ -0,0 +1,3 @@
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e.Leaflet=e.Leaflet||{},e.Leaflet.markercluster=e.Leaflet.markercluster||{}))}(this,function(e){"use strict";var t=L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,clusterPane:L.Marker.prototype.options.pane,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animate:!0,animateAddingMarkers:!1,spiderfyDistanceMultiplier:1,spiderLegPolylineOptions:{weight:1.5,color:"#222",opacity:.5},chunkedLoading:!1,chunkInterval:200,chunkDelay:50,chunkProgress:null,polygonOptions:{}},initialize:function(e){L.Util.setOptions(this,e),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),this._featureGroup=L.featureGroup(),this._featureGroup.addEventParent(this),this._nonPointGroup=L.featureGroup(),this._nonPointGroup.addEventParent(this),this._inZoomAnimation=0,this._needsClustering=[],this._needsRemoving=[],this._currentShownBounds=null,this._queue=[],this._childMarkerEventHandlers={dragstart:this._childMarkerDragStart,move:this._childMarkerMoved,dragend:this._childMarkerDragEnd};var t=L.DomUtil.TRANSITION&&this.options.animate;L.extend(this,t?this._withAnimation:this._noAnimation),this._markerCluster=t?L.MarkerCluster:L.MarkerClusterNonAnimated},addLayer:function(e){if(e instanceof L.LayerGroup)return this.addLayers([e]);if(!e.getLatLng)return this._nonPointGroup.addLayer(e),this.fire("layeradd",{layer:e}),this;if(!this._map)return this._needsClustering.push(e),this.fire("layeradd",{layer:e}),this;if(this.hasLayer(e))return this;this._unspiderfy&&this._unspiderfy(),this._addLayer(e,this._maxZoom),this.fire("layeradd",{layer:e}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons();var t=e,i=this._zoom;if(e.__parent)for(;t.__parent._zoom>=i;)t=t.__parent;return this._currentShownBounds.contains(t.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(e,t):this._animationAddLayerNonAnimated(e,t)),this},removeLayer:function(e){return e instanceof L.LayerGroup?this.removeLayers([e]):e.getLatLng?this._map?e.__parent?(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(e)),this._removeLayer(e,!0),this.fire("layerremove",{layer:e}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),e.off(this._childMarkerEventHandlers,this),this._featureGroup.hasLayer(e)&&(this._featureGroup.removeLayer(e),e.clusterShow&&e.clusterShow()),this):this:(!this._arraySplice(this._needsClustering,e)&&this.hasLayer(e)&&this._needsRemoving.push({layer:e,latlng:e._latlng}),this.fire("layerremove",{layer:e}),this):(this._nonPointGroup.removeLayer(e),this.fire("layerremove",{layer:e}),this)},addLayers:function(e,t){if(!L.Util.isArray(e))return this.addLayer(e);var i,n=this._featureGroup,r=this._nonPointGroup,s=this.options.chunkedLoading,o=this.options.chunkInterval,a=this.options.chunkProgress,h=e.length,l=0,u=!0;if(this._map){var _=(new Date).getTime(),d=L.bind(function(){for(var c=(new Date).getTime();h>l;l++){if(s&&0===l%200){var p=(new Date).getTime()-c;if(p>o)break}if(i=e[l],i instanceof L.LayerGroup)u&&(e=e.slice(),u=!1),this._extractNonGroupLayers(i,e),h=e.length;else if(i.getLatLng){if(!this.hasLayer(i)&&(this._addLayer(i,this._maxZoom),t||this.fire("layeradd",{layer:i}),i.__parent&&2===i.__parent.getChildCount())){var f=i.__parent.getAllChildMarkers(),m=f[0]===i?f[1]:f[0];n.removeLayer(m)}}else r.addLayer(i),t||this.fire("layeradd",{layer:i})}a&&a(l,h,(new Date).getTime()-_),l===h?(this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)):setTimeout(d,this.options.chunkDelay)},this);d()}else for(var c=this._needsClustering;h>l;l++)i=e[l],i instanceof L.LayerGroup?(u&&(e=e.slice(),u=!1),this._extractNonGroupLayers(i,e),h=e.length):i.getLatLng?this.hasLayer(i)||c.push(i):r.addLayer(i);return this},removeLayers:function(e){var t,i,n=e.length,r=this._featureGroup,s=this._nonPointGroup,o=!0;if(!this._map){for(t=0;n>t;t++)i=e[t],i instanceof L.LayerGroup?(o&&(e=e.slice(),o=!1),this._extractNonGroupLayers(i,e),n=e.length):(this._arraySplice(this._needsClustering,i),s.removeLayer(i),this.hasLayer(i)&&this._needsRemoving.push({layer:i,latlng:i._latlng}),this.fire("layerremove",{layer:i}));return this}if(this._unspiderfy){this._unspiderfy();var a=e.slice(),h=n;for(t=0;h>t;t++)i=a[t],i instanceof L.LayerGroup?(this._extractNonGroupLayers(i,a),h=a.length):this._unspiderfyLayer(i)}for(t=0;n>t;t++)i=e[t],i instanceof L.LayerGroup?(o&&(e=e.slice(),o=!1),this._extractNonGroupLayers(i,e),n=e.length):i.__parent?(this._removeLayer(i,!0,!0),this.fire("layerremove",{layer:i}),r.hasLayer(i)&&(r.removeLayer(i),i.clusterShow&&i.clusterShow())):(s.removeLayer(i),this.fire("layerremove",{layer:i}));return this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds),this},clearLayers:function(){return this._map||(this._needsClustering=[],this._needsRemoving=[],delete this._gridClusters,delete this._gridUnclustered),this._noanimationUnspiderfy&&this._noanimationUnspiderfy(),this._featureGroup.clearLayers(),this._nonPointGroup.clearLayers(),this.eachLayer(function(e){e.off(this._childMarkerEventHandlers,this),delete e.__parent},this),this._map&&this._generateInitialClusters(),this},getBounds:function(){var e=new L.LatLngBounds;this._topClusterLevel&&e.extend(this._topClusterLevel._bounds);for(var t=this._needsClustering.length-1;t>=0;t--)e.extend(this._needsClustering[t].getLatLng());return e.extend(this._nonPointGroup.getBounds()),e},eachLayer:function(e,t){var i,n,r,s=this._needsClustering.slice(),o=this._needsRemoving;for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(s),n=s.length-1;n>=0;n--){for(i=!0,r=o.length-1;r>=0;r--)if(o[r].layer===s[n]){i=!1;break}i&&e.call(t,s[n])}this._nonPointGroup.eachLayer(e,t)},getLayers:function(){var e=[];return this.eachLayer(function(t){e.push(t)}),e},getLayer:function(e){var t=null;return e=parseInt(e,10),this.eachLayer(function(i){L.stamp(i)===e&&(t=i)}),t},hasLayer:function(e){if(!e)return!1;var t,i=this._needsClustering;for(t=i.length-1;t>=0;t--)if(i[t]===e)return!0;for(i=this._needsRemoving,t=i.length-1;t>=0;t--)if(i[t].layer===e)return!1;return!(!e.__parent||e.__parent._group!==this)||this._nonPointGroup.hasLayer(e)},zoomToShowLayer:function(e,t){"function"!=typeof t&&(t=function(){});var i=function(){!e._icon&&!e.__parent._icon||this._inZoomAnimation||(this._map.off("moveend",i,this),this.off("animationend",i,this),e._icon?t():e.__parent._icon&&(this.once("spiderfied",t,this),e.__parent.spiderfy()))};e._icon&&this._map.getBounds().contains(e.getLatLng())?t():e.__parent._zoom<Math.round(this._map._zoom)?(this._map.on("moveend",i,this),this._map.panTo(e.getLatLng())):(this._map.on("moveend",i,this),this.on("animationend",i,this),e.__parent.zoomToBounds())},onAdd:function(e){this._map=e;var t,i,n;if(!isFinite(this._map.getMaxZoom()))throw"Map has no maxZoom specified";for(this._featureGroup.addTo(e),this._nonPointGroup.addTo(e),this._gridClusters||this._generateInitialClusters(),this._maxLat=e.options.crs.projection.MAX_LATITUDE,t=0,i=this._needsRemoving.length;i>t;t++)n=this._needsRemoving[t],n.newlatlng=n.layer._latlng,n.layer._latlng=n.latlng;for(t=0,i=this._needsRemoving.length;i>t;t++)n=this._needsRemoving[t],this._removeLayer(n.layer,!0),n.layer._latlng=n.newlatlng;this._needsRemoving=[],this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds(),this._map.on("zoomend",this._zoomEnd,this),this._map.on("moveend",this._moveEnd,this),this._spiderfierOnAdd&&this._spiderfierOnAdd(),this._bindEvents(),i=this._needsClustering,this._needsClustering=[],this.addLayers(i,!0)},onRemove:function(e){e.off("zoomend",this._zoomEnd,this),e.off("moveend",this._moveEnd,this),this._unbindEvents(),this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim",""),this._spiderfierOnRemove&&this._spiderfierOnRemove(),delete this._maxLat,this._hideCoverage(),this._featureGroup.remove(),this._nonPointGroup.remove(),this._featureGroup.clearLayers(),this._map=null},getVisibleParent:function(e){for(var t=e;t&&!t._icon;)t=t.__parent;return t||null},_arraySplice:function(e,t){for(var i=e.length-1;i>=0;i--)if(e[i]===t)return e.splice(i,1),!0},_removeFromGridUnclustered:function(e,t){for(var i=this._map,n=this._gridUnclustered,r=Math.floor(this._map.getMinZoom());t>=r&&n[t].removeObject(e,i.project(e.getLatLng(),t));t--);},_childMarkerDragStart:function(e){e.target.__dragStart=e.target._latlng},_childMarkerMoved:function(e){if(!this._ignoreMove&&!e.target.__dragStart){var t=e.target._popup&&e.target._popup.isOpen();this._moveChild(e.target,e.oldLatLng,e.latlng),t&&e.target.openPopup()}},_moveChild:function(e,t,i){e._latlng=t,this.removeLayer(e),e._latlng=i,this.addLayer(e)},_childMarkerDragEnd:function(e){var t=e.target.__dragStart;delete e.target.__dragStart,t&&this._moveChild(e.target,t,e.target._latlng)},_removeLayer:function(e,t,i){var n=this._gridClusters,r=this._gridUnclustered,s=this._featureGroup,o=this._map,a=Math.floor(this._map.getMinZoom());t&&this._removeFromGridUnclustered(e,this._maxZoom);var h,l=e.__parent,u=l._markers;for(this._arraySplice(u,e);l&&(l._childCount--,l._boundsNeedUpdate=!0,!(l._zoom<a));)t&&l._childCount<=1?(h=l._markers[0]===e?l._markers[1]:l._markers[0],n[l._zoom].removeObject(l,o.project(l._cLatLng,l._zoom)),r[l._zoom].addObject(h,o.project(h.getLatLng(),l._zoom)),this._arraySplice(l.__parent._childClusters,l),l.__parent._markers.push(h),h.__parent=l.__parent,l._icon&&(s.removeLayer(l),i||s.addLayer(h))):l._iconNeedsUpdate=!0,l=l.__parent;delete e.__parent},_isOrIsParent:function(e,t){for(;t;){if(e===t)return!0;t=t.parentNode}return!1},fire:function(e,t,i){if(t&&t.layer instanceof L.MarkerCluster){if(t.originalEvent&&this._isOrIsParent(t.layer._icon,t.originalEvent.relatedTarget))return;e="cluster"+e}L.FeatureGroup.prototype.fire.call(this,e,t,i)},listens:function(e,t){return L.FeatureGroup.prototype.listens.call(this,e,t)||L.FeatureGroup.prototype.listens.call(this,"cluster"+e,t)},_defaultIconCreateFunction:function(e){var t=e.getChildCount(),i=" marker-cluster-";return i+=10>t?"small":100>t?"medium":"large",new L.DivIcon({html:"<div><span>"+t+"</span></div>",className:"marker-cluster"+i,iconSize:new L.Point(40,40)})},_bindEvents:function(){var e=this._map,t=this.options.spiderfyOnMaxZoom,i=this.options.showCoverageOnHover,n=this.options.zoomToBoundsOnClick;(t||n)&&this.on("clusterclick",this._zoomOrSpiderfy,this),i&&(this.on("clustermouseover",this._showCoverage,this),this.on("clustermouseout",this._hideCoverage,this),e.on("zoomend",this._hideCoverage,this))},_zoomOrSpiderfy:function(e){for(var t=e.layer,i=t;1===i._childClusters.length;)i=i._childClusters[0];i._zoom===this._maxZoom&&i._childCount===t._childCount&&this.options.spiderfyOnMaxZoom?t.spiderfy():this.options.zoomToBoundsOnClick&&t.zoomToBounds(),e.originalEvent&&13===e.originalEvent.keyCode&&this._map._container.focus()},_showCoverage:function(e){var t=this._map;this._inZoomAnimation||(this._shownPolygon&&t.removeLayer(this._shownPolygon),e.layer.getChildCount()>2&&e.layer!==this._spiderfied&&(this._shownPolygon=new L.Polygon(e.layer.getConvexHull(),this.options.polygonOptions),t.addLayer(this._shownPolygon)))},_hideCoverage:function(){this._shownPolygon&&(this._map.removeLayer(this._shownPolygon),this._shownPolygon=null)},_unbindEvents:function(){var e=this.options.spiderfyOnMaxZoom,t=this.options.showCoverageOnHover,i=this.options.zoomToBoundsOnClick,n=this._map;(e||i)&&this.off("clusterclick",this._zoomOrSpiderfy,this),t&&(this.off("clustermouseover",this._showCoverage,this),this.off("clustermouseout",this._hideCoverage,this),n.off("zoomend",this._hideCoverage,this))},_zoomEnd:function(){this._map&&(this._mergeSplitClusters(),this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds())},_moveEnd:function(){if(!this._inZoomAnimation){var e=this._getExpandedVisibleBounds();this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,e),this._topClusterLevel._recursivelyAddChildrenToMap(null,Math.round(this._map._zoom),e),this._currentShownBounds=e}},_generateInitialClusters:function(){var e=Math.ceil(this._map.getMaxZoom()),t=Math.floor(this._map.getMinZoom()),i=this.options.maxClusterRadius,n=i;"function"!=typeof i&&(n=function(){return i}),null!==this.options.disableClusteringAtZoom&&(e=this.options.disableClusteringAtZoom-1),this._maxZoom=e,this._gridClusters={},this._gridUnclustered={};for(var r=e;r>=t;r--)this._gridClusters[r]=new L.DistanceGrid(n(r)),this._gridUnclustered[r]=new L.DistanceGrid(n(r));this._topClusterLevel=new this._markerCluster(this,t-1)},_addLayer:function(e,t){var i,n,r=this._gridClusters,s=this._gridUnclustered,o=Math.floor(this._map.getMinZoom());for(this.options.singleMarkerMode&&this._overrideMarkerIcon(e),e.on(this._childMarkerEventHandlers,this);t>=o;t--){i=this._map.project(e.getLatLng(),t);var a=r[t].getNearObject(i);if(a)return a._addChild(e),e.__parent=a,void 0;if(a=s[t].getNearObject(i)){var h=a.__parent;h&&this._removeLayer(a,!1);var l=new this._markerCluster(this,t,a,e);r[t].addObject(l,this._map.project(l._cLatLng,t)),a.__parent=l,e.__parent=l;var u=l;for(n=t-1;n>h._zoom;n--)u=new this._markerCluster(this,n,u),r[n].addObject(u,this._map.project(a.getLatLng(),n));return h._addChild(u),this._removeFromGridUnclustered(a,t),void 0}s[t].addObject(e,i)}this._topClusterLevel._addChild(e),e.__parent=this._topClusterLevel},_refreshClustersIcons:function(){this._featureGroup.eachLayer(function(e){e instanceof L.MarkerCluster&&e._iconNeedsUpdate&&e._updateIcon()})},_enqueue:function(e){this._queue.push(e),this._queueTimeout||(this._queueTimeout=setTimeout(L.bind(this._processQueue,this),300))},_processQueue:function(){for(var e=0;e<this._queue.length;e++)this._queue[e].call(this);this._queue.length=0,clearTimeout(this._queueTimeout),this._queueTimeout=null},_mergeSplitClusters:function(){var e=Math.round(this._map._zoom);this._processQueue(),this._zoom<e&&this._currentShownBounds.intersects(this._getExpandedVisibleBounds())?(this._animationStart(),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,this._getExpandedVisibleBounds()),this._animationZoomIn(this._zoom,e)):this._zoom>e?(this._animationStart(),this._animationZoomOut(this._zoom,e)):this._moveEnd()},_getExpandedVisibleBounds:function(){return this.options.removeOutsideVisibleBounds?L.Browser.mobile?this._checkBoundsMaxLat(this._map.getBounds()):this._checkBoundsMaxLat(this._map.getBounds().pad(1)):this._mapBoundsInfinite},_checkBoundsMaxLat:function(e){var t=this._maxLat;return void 0!==t&&(e.getNorth()>=t&&(e._northEast.lat=1/0),e.getSouth()<=-t&&(e._southWest.lat=-1/0)),e},_animationAddLayerNonAnimated:function(e,t){if(t===e)this._featureGroup.addLayer(e);else if(2===t._childCount){t._addToMap();var i=t.getAllChildMarkers();this._featureGroup.removeLayer(i[0]),this._featureGroup.removeLayer(i[1])}else t._updateIcon()},_extractNonGroupLayers:function(e,t){var i,n=e.getLayers(),r=0;for(t=t||[];r<n.length;r++)i=n[r],i instanceof L.LayerGroup?this._extractNonGroupLayers(i,t):t.push(i);return t},_overrideMarkerIcon:function(e){var t=e.options.icon=this.options.iconCreateFunction({getChildCount:function(){return 1},getAllChildMarkers:function(){return[e]}});return t}});L.MarkerClusterGroup.include({_mapBoundsInfinite:new L.LatLngBounds(new L.LatLng(-1/0,-1/0),new L.LatLng(1/0,1/0))}),L.MarkerClusterGroup.include({_noAnimation:{_animationStart:function(){},_animationZoomIn:function(e,t){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),e),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationZoomOut:function(e,t){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),e),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationAddLayer:function(e,t){this._animationAddLayerNonAnimated(e,t)}},_withAnimation:{_animationStart:function(){this._map._mapPane.className+=" leaflet-cluster-anim",this._inZoomAnimation++},_animationZoomIn:function(e,t){var i,n=this._getExpandedVisibleBounds(),r=this._featureGroup,s=Math.floor(this._map.getMinZoom());this._ignoreMove=!0,this._topClusterLevel._recursively(n,e,s,function(s){var o,a=s._latlng,h=s._markers;for(n.contains(a)||(a=null),s._isSingleParent()&&e+1===t?(r.removeLayer(s),s._recursivelyAddChildrenToMap(null,t,n)):(s.clusterHide(),s._recursivelyAddChildrenToMap(a,t,n)),i=h.length-1;i>=0;i--)o=h[i],n.contains(o._latlng)||r.removeLayer(o)}),this._forceLayout(),this._topClusterLevel._recursivelyBecomeVisible(n,t),r.eachLayer(function(e){e instanceof L.MarkerCluster||!e._icon||e.clusterShow()}),this._topClusterLevel._recursively(n,e,t,function(e){e._recursivelyRestoreChildPositions(t)}),this._ignoreMove=!1,this._enqueue(function(){this._topClusterLevel._recursively(n,e,s,function(e){r.removeLayer(e),e.clusterShow()}),this._animationEnd()})},_animationZoomOut:function(e,t){this._animationZoomOutSingle(this._topClusterLevel,e-1,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),e,this._getExpandedVisibleBounds())},_animationAddLayer:function(e,t){var i=this,n=this._featureGroup;n.addLayer(e),t!==e&&(t._childCount>2?(t._updateIcon(),this._forceLayout(),this._animationStart(),e._setPos(this._map.latLngToLayerPoint(t.getLatLng())),e.clusterHide(),this._enqueue(function(){n.removeLayer(e),e.clusterShow(),i._animationEnd()})):(this._forceLayout(),i._animationStart(),i._animationZoomOutSingle(t,this._map.getMaxZoom(),this._zoom)))}},_animationZoomOutSingle:function(e,t,i){var n=this._getExpandedVisibleBounds(),r=Math.floor(this._map.getMinZoom());e._recursivelyAnimateChildrenInAndAddSelfToMap(n,r,t+1,i);var s=this;this._forceLayout(),e._recursivelyBecomeVisible(n,i),this._enqueue(function(){if(1===e._childCount){var o=e._markers[0];this._ignoreMove=!0,o.setLatLng(o.getLatLng()),this._ignoreMove=!1,o.clusterShow&&o.clusterShow()}else e._recursively(n,i,r,function(e){e._recursivelyRemoveChildrenFromMap(n,r,t+1)});s._animationEnd()})},_animationEnd:function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim","")),this._inZoomAnimation--,this.fire("animationend")},_forceLayout:function(){L.Util.falseFn(document.body.offsetWidth)}}),L.markerClusterGroup=function(e){return new L.MarkerClusterGroup(e)};var i=L.MarkerCluster=L.Marker.extend({options:L.Icon.prototype.options,initialize:function(e,t,i,n){L.Marker.prototype.initialize.call(this,i?i._cLatLng||i.getLatLng():new L.LatLng(0,0),{icon:this,pane:e.options.clusterPane}),this._group=e,this._zoom=t,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._bounds=new L.LatLngBounds,i&&this._addChild(i),n&&this._addChild(n)},getAllChildMarkers:function(e,t){e=e||[];for(var i=this._childClusters.length-1;i>=0;i--)this._childClusters[i].getAllChildMarkers(e);for(var n=this._markers.length-1;n>=0;n--)t&&this._markers[n].__dragStart||e.push(this._markers[n]);return e},getChildCount:function(){return this._childCount},zoomToBounds:function(e){for(var t,i=this._childClusters.slice(),n=this._group._map,r=n.getBoundsZoom(this._bounds),s=this._zoom+1,o=n.getZoom();i.length>0&&r>s;){s++;var a=[];for(t=0;t<i.length;t++)a=a.concat(i[t]._childClusters);i=a}r>s?this._group._map.setView(this._latlng,s):o>=r?this._group._map.setView(this._latlng,o+1):this._group._map.fitBounds(this._bounds,e)},getBounds:function(){var e=new L.LatLngBounds;return e.extend(this._bounds),e},_updateIcon:function(){this._iconNeedsUpdate=!0,this._icon&&this.setIcon(this)},createIcon:function(){return this._iconNeedsUpdate&&(this._iconObj=this._group.options.iconCreateFunction(this),this._iconNeedsUpdate=!1),this._iconObj.createIcon()},createShadow:function(){return this._iconObj.createShadow()},_addChild:function(e,t){this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._setClusterCenter(e),e instanceof L.MarkerCluster?(t||(this._childClusters.push(e),e.__parent=this),this._childCount+=e._childCount):(t||this._markers.push(e),this._childCount++),this.__parent&&this.__parent._addChild(e,!0)},_setClusterCenter:function(e){this._cLatLng||(this._cLatLng=e._cLatLng||e._latlng)},_resetBounds:function(){var e=this._bounds;e._southWest&&(e._southWest.lat=1/0,e._southWest.lng=1/0),e._northEast&&(e._northEast.lat=-1/0,e._northEast.lng=-1/0)},_recalculateBounds:function(){var e,t,i,n,r=this._markers,s=this._childClusters,o=0,a=0,h=this._childCount;if(0!==h){for(this._resetBounds(),e=0;e<r.length;e++)i=r[e]._latlng,this._bounds.extend(i),o+=i.lat,a+=i.lng;for(e=0;e<s.length;e++)t=s[e],t._boundsNeedUpdate&&t._recalculateBounds(),this._bounds.extend(t._bounds),i=t._wLatLng,n=t._childCount,o+=i.lat*n,a+=i.lng*n;this._latlng=this._wLatLng=new L.LatLng(o/h,a/h),this._boundsNeedUpdate=!1}},_addToMap:function(e){e&&(this._backupLatlng=this._latlng,this.setLatLng(e)),this._group._featureGroup.addLayer(this)},_recursivelyAnimateChildrenIn:function(e,t,i){this._recursively(e,this._group._map.getMinZoom(),i-1,function(e){var i,n,r=e._markers;for(i=r.length-1;i>=0;i--)n=r[i],n._icon&&(n._setPos(t),n.clusterHide())},function(e){var i,n,r=e._childClusters;for(i=r.length-1;i>=0;i--)n=r[i],n._icon&&(n._setPos(t),n.clusterHide())})},_recursivelyAnimateChildrenInAndAddSelfToMap:function(e,t,i,n){this._recursively(e,n,t,function(r){r._recursivelyAnimateChildrenIn(e,r._group._map.latLngToLayerPoint(r.getLatLng()).round(),i),r._isSingleParent()&&i-1===n?(r.clusterShow(),r._recursivelyRemoveChildrenFromMap(e,t,i)):r.clusterHide(),r._addToMap()})},_recursivelyBecomeVisible:function(e,t){this._recursively(e,this._group._map.getMinZoom(),t,null,function(e){e.clusterShow()})},_recursivelyAddChildrenToMap:function(e,t,i){this._recursively(i,this._group._map.getMinZoom()-1,t,function(n){if(t!==n._zoom)for(var r=n._markers.length-1;r>=0;r--){var s=n._markers[r];i.contains(s._latlng)&&(e&&(s._backupLatlng=s.getLatLng(),s.setLatLng(e),s.clusterHide&&s.clusterHide()),n._group._featureGroup.addLayer(s))}},function(t){t._addToMap(e)})},_recursivelyRestoreChildPositions:function(e){for(var t=this._markers.length-1;t>=0;t--){var i=this._markers[t];i._backupLatlng&&(i.setLatLng(i._backupLatlng),delete i._backupLatlng)}if(e-1===this._zoom)for(var n=this._childClusters.length-1;n>=0;n--)this._childClusters[n]._restorePosition();else for(var r=this._childClusters.length-1;r>=0;r--)this._childClusters[r]._recursivelyRestoreChildPositions(e)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(e,t,i,n){var r,s;this._recursively(e,t-1,i-1,function(e){for(s=e._markers.length-1;s>=0;s--)r=e._markers[s],n&&n.contains(r._latlng)||(e._group._featureGroup.removeLayer(r),r.clusterShow&&r.clusterShow())},function(e){for(s=e._childClusters.length-1;s>=0;s--)r=e._childClusters[s],n&&n.contains(r._latlng)||(e._group._featureGroup.removeLayer(r),r.clusterShow&&r.clusterShow())})},_recursively:function(e,t,i,n,r){var s,o,a=this._childClusters,h=this._zoom;if(h>=t&&(n&&n(this),r&&h===i&&r(this)),t>h||i>h)for(s=a.length-1;s>=0;s--)o=a[s],o._boundsNeedUpdate&&o._recalculateBounds(),e.intersects(o._bounds)&&o._recursively(e,t,i,n,r)},_isSingleParent:function(){return this._childClusters.length>0&&this._childClusters[0]._childCount===this._childCount}});L.Marker.include({clusterHide:function(){var e=this.options.opacity;return this.setOpacity(0),this.options.opacity=e,this},clusterShow:function(){return this.setOpacity(this.options.opacity)}}),L.DistanceGrid=function(e){this._cellSize=e,this._sqCellSize=e*e,this._grid={},this._objectPoint={}},L.DistanceGrid.prototype={addObject:function(e,t){var i=this._getCoord(t.x),n=this._getCoord(t.y),r=this._grid,s=r[n]=r[n]||{},o=s[i]=s[i]||[],a=L.Util.stamp(e);this._objectPoint[a]=t,o.push(e)},updateObject:function(e,t){this.removeObject(e),this.addObject(e,t)},removeObject:function(e,t){var i,n,r=this._getCoord(t.x),s=this._getCoord(t.y),o=this._grid,a=o[s]=o[s]||{},h=a[r]=a[r]||[];for(delete this._objectPoint[L.Util.stamp(e)],i=0,n=h.length;n>i;i++)if(h[i]===e)return h.splice(i,1),1===n&&delete a[r],!0},eachObject:function(e,t){var i,n,r,s,o,a,h,l=this._grid;for(i in l){o=l[i];for(n in o)for(a=o[n],r=0,s=a.length;s>r;r++)h=e.call(t,a[r]),h&&(r--,s--)}},getNearObject:function(e){var t,i,n,r,s,o,a,h,l=this._getCoord(e.x),u=this._getCoord(e.y),_=this._objectPoint,d=this._sqCellSize,c=null;for(t=u-1;u+1>=t;t++)if(r=this._grid[t])for(i=l-1;l+1>=i;i++)if(s=r[i])for(n=0,o=s.length;o>n;n++)a=s[n],h=this._sqDist(_[L.Util.stamp(a)],e),(d>h||d>=h&&null===c)&&(d=h,c=a);return c},_getCoord:function(e){var t=Math.floor(e/this._cellSize);return isFinite(t)?t:e},_sqDist:function(e,t){var i=t.x-e.x,n=t.y-e.y;return i*i+n*n}},function(){L.QuickHull={getDistant:function(e,t){var i=t[1].lat-t[0].lat,n=t[0].lng-t[1].lng;return n*(e.lat-t[0].lat)+i*(e.lng-t[0].lng)},findMostDistantPointFromBaseLine:function(e,t){var i,n,r,s=0,o=null,a=[];for(i=t.length-1;i>=0;i--)n=t[i],r=this.getDistant(n,e),r>0&&(a.push(n),r>s&&(s=r,o=n));return{maxPoint:o,newPoints:a}},buildConvexHull:function(e,t){var i=[],n=this.findMostDistantPointFromBaseLine(e,t);return n.maxPoint?(i=i.concat(this.buildConvexHull([e[0],n.maxPoint],n.newPoints)),i=i.concat(this.buildConvexHull([n.maxPoint,e[1]],n.newPoints))):[e[0]]},getConvexHull:function(e){var t,i=!1,n=!1,r=!1,s=!1,o=null,a=null,h=null,l=null,u=null,_=null;for(t=e.length-1;t>=0;t--){var d=e[t];(i===!1||d.lat>i)&&(o=d,i=d.lat),(n===!1||d.lat<n)&&(a=d,n=d.lat),(r===!1||d.lng>r)&&(h=d,r=d.lng),(s===!1||d.lng<s)&&(l=d,s=d.lng)}n!==i?(_=a,u=o):(_=l,u=h);var c=[].concat(this.buildConvexHull([_,u],e),this.buildConvexHull([u,_],e));return c}}}(),L.MarkerCluster.include({getConvexHull:function(){var e,t,i=this.getAllChildMarkers(),n=[];for(t=i.length-1;t>=0;t--)e=i[t].getLatLng(),n.push(e);return L.QuickHull.getConvexHull(n)}}),L.MarkerCluster.include({_2PI:2*Math.PI,_circleFootSeparation:25,_circleStartAngle:0,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:function(){if(this._group._spiderfied!==this&&!this._group._inZoomAnimation){var e,t=this.getAllChildMarkers(null,!0),i=this._group,n=i._map,r=n.latLngToLayerPoint(this._latlng);this._group._unspiderfy(),this._group._spiderfied=this,t.length>=this._circleSpiralSwitchover?e=this._generatePointsSpiral(t.length,r):(r.y+=10,e=this._generatePointsCircle(t.length,r)),this._animationSpiderfy(t,e)}},unspiderfy:function(e){this._group._inZoomAnimation||(this._animationUnspiderfy(e),this._group._spiderfied=null)},_generatePointsCircle:function(e,t){var i,n,r=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+e),s=r/this._2PI,o=this._2PI/e,a=[];for(s=Math.max(s,35),a.length=e,i=0;e>i;i++)n=this._circleStartAngle+i*o,a[i]=new L.Point(t.x+s*Math.cos(n),t.y+s*Math.sin(n))._round();return a},_generatePointsSpiral:function(e,t){var i,n=this._group.options.spiderfyDistanceMultiplier,r=n*this._spiralLengthStart,s=n*this._spiralFootSeparation,o=n*this._spiralLengthFactor*this._2PI,a=0,h=[];for(h.length=e,i=e;i>=0;i--)e>i&&(h[i]=new L.Point(t.x+r*Math.cos(a),t.y+r*Math.sin(a))._round()),a+=s/r+5e-4*i,r+=o/a;return h},_noanimationUnspiderfy:function(){var e,t,i=this._group,n=i._map,r=i._featureGroup,s=this.getAllChildMarkers(null,!0);for(i._ignoreMove=!0,this.setOpacity(1),t=s.length-1;t>=0;t--)e=s[t],r.removeLayer(e),e._preSpiderfyLatlng&&(e.setLatLng(e._preSpiderfyLatlng),delete e._preSpiderfyLatlng),e.setZIndexOffset&&e.setZIndexOffset(0),e._spiderLeg&&(n.removeLayer(e._spiderLeg),delete e._spiderLeg);i.fire("unspiderfied",{cluster:this,markers:s}),i._ignoreMove=!1,i._spiderfied=null}}),L.MarkerClusterNonAnimated=L.MarkerCluster.extend({_animationSpiderfy:function(e,t){var i,n,r,s,o=this._group,a=o._map,h=o._featureGroup,l=this._group.options.spiderLegPolylineOptions;for(o._ignoreMove=!0,i=0;i<e.length;i++)s=a.layerPointToLatLng(t[i]),n=e[i],r=new L.Polyline([this._latlng,s],l),a.addLayer(r),n._spiderLeg=r,n._preSpiderfyLatlng=n._latlng,n.setLatLng(s),n.setZIndexOffset&&n.setZIndexOffset(1e6),h.addLayer(n);this.setOpacity(.3),o._ignoreMove=!1,o.fire("spiderfied",{cluster:this,markers:e})},_animationUnspiderfy:function(){this._noanimationUnspiderfy()}}),L.MarkerCluster.include({_animationSpiderfy:function(e,t){var i,n,r,s,o,a,h=this,l=this._group,u=l._map,_=l._featureGroup,d=this._latlng,c=u.latLngToLayerPoint(d),p=L.Path.SVG,f=L.extend({},this._group.options.spiderLegPolylineOptions),m=f.opacity;for(void 0===m&&(m=L.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity),p?(f.opacity=0,f.className=(f.className||"")+" leaflet-cluster-spider-leg"):f.opacity=m,l._ignoreMove=!0,i=0;i<e.length;i++)n=e[i],a=u.layerPointToLatLng(t[i]),r=new L.Polyline([d,a],f),u.addLayer(r),n._spiderLeg=r,p&&(s=r._path,o=s.getTotalLength()+.1,s.style.strokeDasharray=o,s.style.strokeDashoffset=o),n.setZIndexOffset&&n.setZIndexOffset(1e6),n.clusterHide&&n.clusterHide(),_.addLayer(n),n._setPos&&n._setPos(c);for(l._forceLayout(),l._animationStart(),i=e.length-1;i>=0;i--)a=u.layerPointToLatLng(t[i]),n=e[i],n._preSpiderfyLatlng=n._latlng,n.setLatLng(a),n.clusterShow&&n.clusterShow(),p&&(r=n._spiderLeg,s=r._path,s.style.strokeDashoffset=0,r.setStyle({opacity:m}));this.setOpacity(.3),l._ignoreMove=!1,setTimeout(function(){l._animationEnd(),l.fire("spiderfied",{cluster:h,markers:e})},200)},_animationUnspiderfy:function(e){var t,i,n,r,s,o,a=this,h=this._group,l=h._map,u=h._featureGroup,_=e?l._latLngToNewLayerPoint(this._latlng,e.zoom,e.center):l.latLngToLayerPoint(this._latlng),d=this.getAllChildMarkers(null,!0),c=L.Path.SVG;for(h._ignoreMove=!0,h._animationStart(),this.setOpacity(1),i=d.length-1;i>=0;i--)t=d[i],t._preSpiderfyLatlng&&(t.closePopup(),t.setLatLng(t._preSpiderfyLatlng),delete t._preSpiderfyLatlng,o=!0,t._setPos&&(t._setPos(_),o=!1),t.clusterHide&&(t.clusterHide(),o=!1),o&&u.removeLayer(t),c&&(n=t._spiderLeg,r=n._path,s=r.getTotalLength()+.1,r.style.strokeDashoffset=s,n.setStyle({opacity:0})));h._ignoreMove=!1,setTimeout(function(){var e=0;for(i=d.length-1;i>=0;i--)t=d[i],t._spiderLeg&&e++;for(i=d.length-1;i>=0;i--)t=d[i],t._spiderLeg&&(t.clusterShow&&t.clusterShow(),t.setZIndexOffset&&t.setZIndexOffset(0),e>1&&u.removeLayer(t),l.removeLayer(t._spiderLeg),delete t._spiderLeg);h._animationEnd(),h.fire("unspiderfied",{cluster:a,markers:d})},200)}}),L.MarkerClusterGroup.include({_spiderfied:null,unspiderfy:function(){this._unspiderfy.apply(this,arguments)},_spiderfierOnAdd:function(){this._map.on("click",this._unspiderfyWrapper,this),this._map.options.zoomAnimation&&this._map.on("zoomstart",this._unspiderfyZoomStart,this),this._map.on("zoomend",this._noanimationUnspiderfy,this),L.Browser.touch||this._map.getRenderer(this)},_spiderfierOnRemove:function(){this._map.off("click",this._unspiderfyWrapper,this),this._map.off("zoomstart",this._unspiderfyZoomStart,this),this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._map.off("zoomend",this._noanimationUnspiderfy,this),this._noanimationUnspiderfy()
2
+ },_unspiderfyZoomStart:function(){this._map&&this._map.on("zoomanim",this._unspiderfyZoomAnim,this)},_unspiderfyZoomAnim:function(e){L.DomUtil.hasClass(this._map._mapPane,"leaflet-touching")||(this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy(e))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(e){this._spiderfied&&this._spiderfied.unspiderfy(e)},_noanimationUnspiderfy:function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(e){e._spiderLeg&&(this._featureGroup.removeLayer(e),e.clusterShow&&e.clusterShow(),e.setZIndexOffset&&e.setZIndexOffset(0),this._map.removeLayer(e._spiderLeg),delete e._spiderLeg)}}),L.MarkerClusterGroup.include({refreshClusters:function(e){return e?e instanceof L.MarkerClusterGroup?e=e._topClusterLevel.getAllChildMarkers():e instanceof L.LayerGroup?e=e._layers:e instanceof L.MarkerCluster?e=e.getAllChildMarkers():e instanceof L.Marker&&(e=[e]):e=this._topClusterLevel.getAllChildMarkers(),this._flagParentsIconsNeedUpdate(e),this._refreshClustersIcons(),this.options.singleMarkerMode&&this._refreshSingleMarkerModeMarkers(e),this},_flagParentsIconsNeedUpdate:function(e){var t,i;for(t in e)for(i=e[t].__parent;i;)i._iconNeedsUpdate=!0,i=i.__parent},_refreshSingleMarkerModeMarkers:function(e){var t,i;for(t in e)i=e[t],this.hasLayer(i)&&i.setIcon(this._overrideMarkerIcon(i))}}),L.Marker.include({refreshIconOptions:function(e,t){var i=this.options.icon;return L.setOptions(i,e),this.setIcon(i),t&&this.__parent&&this.__parent._group.refreshClusters(this),this}}),e.MarkerClusterGroup=t,e.MarkerCluster=i});
3
+ //# sourceMappingURL=leaflet.markercluster.js.map
@@ -0,0 +1,60 @@
1
+ .marker-cluster-small {
2
+ background-color: rgba(181, 226, 140, 0.6);
3
+ }
4
+ .marker-cluster-small div {
5
+ background-color: rgba(110, 204, 57, 0.6);
6
+ }
7
+
8
+ .marker-cluster-medium {
9
+ background-color: rgba(241, 211, 87, 0.6);
10
+ }
11
+ .marker-cluster-medium div {
12
+ background-color: rgba(240, 194, 12, 0.6);
13
+ }
14
+
15
+ .marker-cluster-large {
16
+ background-color: rgba(253, 156, 115, 0.6);
17
+ }
18
+ .marker-cluster-large div {
19
+ background-color: rgba(241, 128, 23, 0.6);
20
+ }
21
+
22
+ /* IE 6-8 fallback colors */
23
+ .leaflet-oldie .marker-cluster-small {
24
+ background-color: rgb(181, 226, 140);
25
+ }
26
+ .leaflet-oldie .marker-cluster-small div {
27
+ background-color: rgb(110, 204, 57);
28
+ }
29
+
30
+ .leaflet-oldie .marker-cluster-medium {
31
+ background-color: rgb(241, 211, 87);
32
+ }
33
+ .leaflet-oldie .marker-cluster-medium div {
34
+ background-color: rgb(240, 194, 12);
35
+ }
36
+
37
+ .leaflet-oldie .marker-cluster-large {
38
+ background-color: rgb(253, 156, 115);
39
+ }
40
+ .leaflet-oldie .marker-cluster-large div {
41
+ background-color: rgb(241, 128, 23);
42
+ }
43
+
44
+ .marker-cluster {
45
+ background-clip: padding-box;
46
+ border-radius: 20px;
47
+ }
48
+ .marker-cluster div {
49
+ width: 30px;
50
+ height: 30px;
51
+ margin-left: 5px;
52
+ margin-top: 5px;
53
+
54
+ text-align: center;
55
+ border-radius: 15px;
56
+ font: 12px "Helvetica Neue", Arial, Helvetica, sans-serif;
57
+ }
58
+ .marker-cluster span {
59
+ line-height: 30px;
60
+ }
@@ -0,0 +1,14 @@
1
+ .leaflet-cluster-anim .leaflet-marker-icon, .leaflet-cluster-anim .leaflet-marker-shadow {
2
+ -webkit-transition: -webkit-transform 0.3s ease-out, opacity 0.3s ease-in;
3
+ -moz-transition: -moz-transform 0.3s ease-out, opacity 0.3s ease-in;
4
+ -o-transition: -o-transform 0.3s ease-out, opacity 0.3s ease-in;
5
+ transition: transform 0.3s ease-out, opacity 0.3s ease-in;
6
+ }
7
+
8
+ .leaflet-cluster-spider-leg {
9
+ /* stroke-dashoffset (duration and function) should match with leaflet-marker-icon transform in order to track it exactly */
10
+ -webkit-transition: -webkit-stroke-dashoffset 0.3s ease-out, -webkit-stroke-opacity 0.3s ease-in;
11
+ -moz-transition: -moz-stroke-dashoffset 0.3s ease-out, -moz-stroke-opacity 0.3s ease-in;
12
+ -o-transition: -o-stroke-dashoffset 0.3s ease-out, -o-stroke-opacity 0.3s ease-in;
13
+ transition: stroke-dashoffset 0.3s ease-out, stroke-opacity 0.3s ease-in;
14
+ }
@@ -0,0 +1,635 @@
1
+ /* required styles */
2
+
3
+ .leaflet-pane,
4
+ .leaflet-tile,
5
+ .leaflet-marker-icon,
6
+ .leaflet-marker-shadow,
7
+ .leaflet-tile-container,
8
+ .leaflet-pane > svg,
9
+ .leaflet-pane > canvas,
10
+ .leaflet-zoom-box,
11
+ .leaflet-image-layer,
12
+ .leaflet-layer {
13
+ position: absolute;
14
+ left: 0;
15
+ top: 0;
16
+ }
17
+ .leaflet-container {
18
+ overflow: hidden;
19
+ }
20
+ .leaflet-tile,
21
+ .leaflet-marker-icon,
22
+ .leaflet-marker-shadow {
23
+ -webkit-user-select: none;
24
+ -moz-user-select: none;
25
+ user-select: none;
26
+ -webkit-user-drag: none;
27
+ }
28
+ /* Safari renders non-retina tile on retina better with this, but Chrome is worse */
29
+ .leaflet-safari .leaflet-tile {
30
+ image-rendering: -webkit-optimize-contrast;
31
+ }
32
+ /* hack that prevents hw layers "stretching" when loading new tiles */
33
+ .leaflet-safari .leaflet-tile-container {
34
+ width: 1600px;
35
+ height: 1600px;
36
+ -webkit-transform-origin: 0 0;
37
+ }
38
+ .leaflet-marker-icon,
39
+ .leaflet-marker-shadow {
40
+ display: block;
41
+ }
42
+ /* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */
43
+ /* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */
44
+ .leaflet-container .leaflet-overlay-pane svg,
45
+ .leaflet-container .leaflet-marker-pane img,
46
+ .leaflet-container .leaflet-shadow-pane img,
47
+ .leaflet-container .leaflet-tile-pane img,
48
+ .leaflet-container img.leaflet-image-layer,
49
+ .leaflet-container .leaflet-tile {
50
+ max-width: none !important;
51
+ max-height: none !important;
52
+ }
53
+
54
+ .leaflet-container.leaflet-touch-zoom {
55
+ -ms-touch-action: pan-x pan-y;
56
+ touch-action: pan-x pan-y;
57
+ }
58
+ .leaflet-container.leaflet-touch-drag {
59
+ -ms-touch-action: pinch-zoom;
60
+ /* Fallback for FF which doesn't support pinch-zoom */
61
+ touch-action: none;
62
+ touch-action: pinch-zoom;
63
+ }
64
+ .leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {
65
+ -ms-touch-action: none;
66
+ touch-action: none;
67
+ }
68
+ .leaflet-container {
69
+ -webkit-tap-highlight-color: transparent;
70
+ }
71
+ .leaflet-container a {
72
+ -webkit-tap-highlight-color: rgba(51, 181, 229, 0.4);
73
+ }
74
+ .leaflet-tile {
75
+ filter: inherit;
76
+ visibility: hidden;
77
+ }
78
+ .leaflet-tile-loaded {
79
+ visibility: inherit;
80
+ }
81
+ .leaflet-zoom-box {
82
+ width: 0;
83
+ height: 0;
84
+ -moz-box-sizing: border-box;
85
+ box-sizing: border-box;
86
+ z-index: 800;
87
+ }
88
+ /* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */
89
+ .leaflet-overlay-pane svg {
90
+ -moz-user-select: none;
91
+ }
92
+
93
+ .leaflet-pane { z-index: 400; }
94
+
95
+ .leaflet-tile-pane { z-index: 200; }
96
+ .leaflet-overlay-pane { z-index: 400; }
97
+ .leaflet-shadow-pane { z-index: 500; }
98
+ .leaflet-marker-pane { z-index: 600; }
99
+ .leaflet-tooltip-pane { z-index: 650; }
100
+ .leaflet-popup-pane { z-index: 700; }
101
+
102
+ .leaflet-map-pane canvas { z-index: 100; }
103
+ .leaflet-map-pane svg { z-index: 200; }
104
+
105
+ .leaflet-vml-shape {
106
+ width: 1px;
107
+ height: 1px;
108
+ }
109
+ .lvml {
110
+ behavior: url(#default#VML);
111
+ display: inline-block;
112
+ position: absolute;
113
+ }
114
+
115
+
116
+ /* control positioning */
117
+
118
+ .leaflet-control {
119
+ position: relative;
120
+ z-index: 800;
121
+ pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
122
+ pointer-events: auto;
123
+ }
124
+ .leaflet-top,
125
+ .leaflet-bottom {
126
+ position: absolute;
127
+ z-index: 1000;
128
+ pointer-events: none;
129
+ }
130
+ .leaflet-top {
131
+ top: 0;
132
+ }
133
+ .leaflet-right {
134
+ right: 0;
135
+ }
136
+ .leaflet-bottom {
137
+ bottom: 0;
138
+ }
139
+ .leaflet-left {
140
+ left: 0;
141
+ }
142
+ .leaflet-control {
143
+ float: left;
144
+ clear: both;
145
+ }
146
+ .leaflet-right .leaflet-control {
147
+ float: right;
148
+ }
149
+ .leaflet-top .leaflet-control {
150
+ margin-top: 10px;
151
+ }
152
+ .leaflet-bottom .leaflet-control {
153
+ margin-bottom: 10px;
154
+ }
155
+ .leaflet-left .leaflet-control {
156
+ margin-left: 10px;
157
+ }
158
+ .leaflet-right .leaflet-control {
159
+ margin-right: 10px;
160
+ }
161
+
162
+
163
+ /* zoom and fade animations */
164
+
165
+ .leaflet-fade-anim .leaflet-tile {
166
+ will-change: opacity;
167
+ }
168
+ .leaflet-fade-anim .leaflet-popup {
169
+ opacity: 0;
170
+ -webkit-transition: opacity 0.2s linear;
171
+ -moz-transition: opacity 0.2s linear;
172
+ transition: opacity 0.2s linear;
173
+ }
174
+ .leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
175
+ opacity: 1;
176
+ }
177
+ .leaflet-zoom-animated {
178
+ -webkit-transform-origin: 0 0;
179
+ -ms-transform-origin: 0 0;
180
+ transform-origin: 0 0;
181
+ }
182
+ .leaflet-zoom-anim .leaflet-zoom-animated {
183
+ will-change: transform;
184
+ }
185
+ .leaflet-zoom-anim .leaflet-zoom-animated {
186
+ -webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);
187
+ -moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);
188
+ transition: transform 0.25s cubic-bezier(0,0,0.25,1);
189
+ }
190
+ .leaflet-zoom-anim .leaflet-tile,
191
+ .leaflet-pan-anim .leaflet-tile {
192
+ -webkit-transition: none;
193
+ -moz-transition: none;
194
+ transition: none;
195
+ }
196
+
197
+ .leaflet-zoom-anim .leaflet-zoom-hide {
198
+ visibility: hidden;
199
+ }
200
+
201
+
202
+ /* cursors */
203
+
204
+ .leaflet-interactive {
205
+ cursor: pointer;
206
+ }
207
+ .leaflet-grab {
208
+ cursor: -webkit-grab;
209
+ cursor: -moz-grab;
210
+ cursor: grab;
211
+ }
212
+ .leaflet-crosshair,
213
+ .leaflet-crosshair .leaflet-interactive {
214
+ cursor: crosshair;
215
+ }
216
+ .leaflet-popup-pane,
217
+ .leaflet-control {
218
+ cursor: auto;
219
+ }
220
+ .leaflet-dragging .leaflet-grab,
221
+ .leaflet-dragging .leaflet-grab .leaflet-interactive,
222
+ .leaflet-dragging .leaflet-marker-draggable {
223
+ cursor: move;
224
+ cursor: -webkit-grabbing;
225
+ cursor: -moz-grabbing;
226
+ cursor: grabbing;
227
+ }
228
+
229
+ /* marker & overlays interactivity */
230
+ .leaflet-marker-icon,
231
+ .leaflet-marker-shadow,
232
+ .leaflet-image-layer,
233
+ .leaflet-pane > svg path,
234
+ .leaflet-tile-container {
235
+ pointer-events: none;
236
+ }
237
+
238
+ .leaflet-marker-icon.leaflet-interactive,
239
+ .leaflet-image-layer.leaflet-interactive,
240
+ .leaflet-pane > svg path.leaflet-interactive {
241
+ pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
242
+ pointer-events: auto;
243
+ }
244
+
245
+ /* visual tweaks */
246
+
247
+ .leaflet-container {
248
+ background: #ddd;
249
+ outline: 0;
250
+ }
251
+ .leaflet-container a {
252
+ color: #0078A8;
253
+ }
254
+ .leaflet-container a.leaflet-active {
255
+ outline: 2px solid orange;
256
+ }
257
+ .leaflet-zoom-box {
258
+ border: 2px dotted #38f;
259
+ background: rgba(255,255,255,0.5);
260
+ }
261
+
262
+
263
+ /* general typography */
264
+ .leaflet-container {
265
+ font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif;
266
+ }
267
+
268
+
269
+ /* general toolbar styles */
270
+
271
+ .leaflet-bar {
272
+ box-shadow: 0 1px 5px rgba(0,0,0,0.65);
273
+ border-radius: 4px;
274
+ }
275
+ .leaflet-bar a,
276
+ .leaflet-bar a:hover {
277
+ background-color: #fff;
278
+ border-bottom: 1px solid #ccc;
279
+ width: 26px;
280
+ height: 26px;
281
+ line-height: 26px;
282
+ display: block;
283
+ text-align: center;
284
+ text-decoration: none;
285
+ color: black;
286
+ }
287
+ .leaflet-bar a,
288
+ .leaflet-control-layers-toggle {
289
+ background-position: 50% 50%;
290
+ background-repeat: no-repeat;
291
+ display: block;
292
+ }
293
+ .leaflet-bar a:hover {
294
+ background-color: #f4f4f4;
295
+ }
296
+ .leaflet-bar a:first-child {
297
+ border-top-left-radius: 4px;
298
+ border-top-right-radius: 4px;
299
+ }
300
+ .leaflet-bar a:last-child {
301
+ border-bottom-left-radius: 4px;
302
+ border-bottom-right-radius: 4px;
303
+ border-bottom: none;
304
+ }
305
+ .leaflet-bar a.leaflet-disabled {
306
+ cursor: default;
307
+ background-color: #f4f4f4;
308
+ color: #bbb;
309
+ }
310
+
311
+ .leaflet-touch .leaflet-bar a {
312
+ width: 30px;
313
+ height: 30px;
314
+ line-height: 30px;
315
+ }
316
+ .leaflet-touch .leaflet-bar a:first-child {
317
+ border-top-left-radius: 2px;
318
+ border-top-right-radius: 2px;
319
+ }
320
+ .leaflet-touch .leaflet-bar a:last-child {
321
+ border-bottom-left-radius: 2px;
322
+ border-bottom-right-radius: 2px;
323
+ }
324
+
325
+ /* zoom control */
326
+
327
+ .leaflet-control-zoom-in,
328
+ .leaflet-control-zoom-out {
329
+ font: bold 18px 'Lucida Console', Monaco, monospace;
330
+ text-indent: 1px;
331
+ }
332
+
333
+ .leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out {
334
+ font-size: 22px;
335
+ }
336
+
337
+
338
+ /* layers control */
339
+
340
+ .leaflet-control-layers {
341
+ box-shadow: 0 1px 5px rgba(0,0,0,0.4);
342
+ background: #fff;
343
+ border-radius: 5px;
344
+ }
345
+ .leaflet-control-layers-toggle {
346
+ background-image: url(layers.png);
347
+ width: 36px;
348
+ height: 36px;
349
+ }
350
+ .leaflet-retina .leaflet-control-layers-toggle {
351
+ background-image: url(layers-2x.png);
352
+ background-size: 26px 26px;
353
+ }
354
+ .leaflet-touch .leaflet-control-layers-toggle {
355
+ width: 44px;
356
+ height: 44px;
357
+ }
358
+ .leaflet-control-layers .leaflet-control-layers-list,
359
+ .leaflet-control-layers-expanded .leaflet-control-layers-toggle {
360
+ display: none;
361
+ }
362
+ .leaflet-control-layers-expanded .leaflet-control-layers-list {
363
+ display: block;
364
+ position: relative;
365
+ }
366
+ .leaflet-control-layers-expanded {
367
+ padding: 6px 10px 6px 6px;
368
+ color: #333;
369
+ background: #fff;
370
+ }
371
+ .leaflet-control-layers-scrollbar {
372
+ overflow-y: scroll;
373
+ overflow-x: hidden;
374
+ padding-right: 5px;
375
+ }
376
+ .leaflet-control-layers-selector {
377
+ margin-top: 2px;
378
+ position: relative;
379
+ top: 1px;
380
+ }
381
+ .leaflet-control-layers label {
382
+ display: block;
383
+ }
384
+ .leaflet-control-layers-separator {
385
+ height: 0;
386
+ border-top: 1px solid #ddd;
387
+ margin: 5px -10px 5px -6px;
388
+ }
389
+
390
+ /* Default icon URLs */
391
+ .leaflet-default-icon-path {
392
+ background-image: url(marker-icon.png);
393
+ }
394
+
395
+
396
+ /* attribution and scale controls */
397
+
398
+ .leaflet-container .leaflet-control-attribution {
399
+ background: #fff;
400
+ background: rgba(255, 255, 255, 0.7);
401
+ margin: 0;
402
+ }
403
+ .leaflet-control-attribution,
404
+ .leaflet-control-scale-line {
405
+ padding: 0 5px;
406
+ color: #333;
407
+ }
408
+ .leaflet-control-attribution a {
409
+ text-decoration: none;
410
+ }
411
+ .leaflet-control-attribution a:hover {
412
+ text-decoration: underline;
413
+ }
414
+ .leaflet-container .leaflet-control-attribution,
415
+ .leaflet-container .leaflet-control-scale {
416
+ font-size: 11px;
417
+ }
418
+ .leaflet-left .leaflet-control-scale {
419
+ margin-left: 5px;
420
+ }
421
+ .leaflet-bottom .leaflet-control-scale {
422
+ margin-bottom: 5px;
423
+ }
424
+ .leaflet-control-scale-line {
425
+ border: 2px solid #777;
426
+ border-top: none;
427
+ line-height: 1.1;
428
+ padding: 2px 5px 1px;
429
+ font-size: 11px;
430
+ white-space: nowrap;
431
+ overflow: hidden;
432
+ -moz-box-sizing: border-box;
433
+ box-sizing: border-box;
434
+
435
+ background: #fff;
436
+ background: rgba(255, 255, 255, 0.5);
437
+ }
438
+ .leaflet-control-scale-line:not(:first-child) {
439
+ border-top: 2px solid #777;
440
+ border-bottom: none;
441
+ margin-top: -2px;
442
+ }
443
+ .leaflet-control-scale-line:not(:first-child):not(:last-child) {
444
+ border-bottom: 2px solid #777;
445
+ }
446
+
447
+ .leaflet-touch .leaflet-control-attribution,
448
+ .leaflet-touch .leaflet-control-layers,
449
+ .leaflet-touch .leaflet-bar {
450
+ box-shadow: none;
451
+ }
452
+ .leaflet-touch .leaflet-control-layers,
453
+ .leaflet-touch .leaflet-bar {
454
+ border: 2px solid rgba(0,0,0,0.2);
455
+ background-clip: padding-box;
456
+ }
457
+
458
+
459
+ /* popup */
460
+
461
+ .leaflet-popup {
462
+ position: absolute;
463
+ text-align: center;
464
+ margin-bottom: 20px;
465
+ }
466
+ .leaflet-popup-content-wrapper {
467
+ padding: 1px;
468
+ text-align: left;
469
+ border-radius: 12px;
470
+ }
471
+ .leaflet-popup-content {
472
+ margin: 13px 19px;
473
+ line-height: 1.4;
474
+ }
475
+ .leaflet-popup-content p {
476
+ margin: 18px 0;
477
+ }
478
+ .leaflet-popup-tip-container {
479
+ width: 40px;
480
+ height: 20px;
481
+ position: absolute;
482
+ left: 50%;
483
+ margin-left: -20px;
484
+ overflow: hidden;
485
+ pointer-events: none;
486
+ }
487
+ .leaflet-popup-tip {
488
+ width: 17px;
489
+ height: 17px;
490
+ padding: 1px;
491
+
492
+ margin: -10px auto 0;
493
+
494
+ -webkit-transform: rotate(45deg);
495
+ -moz-transform: rotate(45deg);
496
+ -ms-transform: rotate(45deg);
497
+ transform: rotate(45deg);
498
+ }
499
+ .leaflet-popup-content-wrapper,
500
+ .leaflet-popup-tip {
501
+ background: white;
502
+ color: #333;
503
+ box-shadow: 0 3px 14px rgba(0,0,0,0.4);
504
+ }
505
+ .leaflet-container a.leaflet-popup-close-button {
506
+ position: absolute;
507
+ top: 0;
508
+ right: 0;
509
+ padding: 4px 4px 0 0;
510
+ border: none;
511
+ text-align: center;
512
+ width: 18px;
513
+ height: 14px;
514
+ font: 16px/14px Tahoma, Verdana, sans-serif;
515
+ color: #c3c3c3;
516
+ text-decoration: none;
517
+ font-weight: bold;
518
+ background: transparent;
519
+ }
520
+ .leaflet-container a.leaflet-popup-close-button:hover {
521
+ color: #999;
522
+ }
523
+ .leaflet-popup-scrolled {
524
+ overflow: auto;
525
+ border-bottom: 1px solid #ddd;
526
+ border-top: 1px solid #ddd;
527
+ }
528
+
529
+ .leaflet-oldie .leaflet-popup-content-wrapper {
530
+ zoom: 1;
531
+ }
532
+ .leaflet-oldie .leaflet-popup-tip {
533
+ width: 24px;
534
+ margin: 0 auto;
535
+
536
+ -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";
537
+ filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);
538
+ }
539
+ .leaflet-oldie .leaflet-popup-tip-container {
540
+ margin-top: -1px;
541
+ }
542
+
543
+ .leaflet-oldie .leaflet-control-zoom,
544
+ .leaflet-oldie .leaflet-control-layers,
545
+ .leaflet-oldie .leaflet-popup-content-wrapper,
546
+ .leaflet-oldie .leaflet-popup-tip {
547
+ border: 1px solid #999;
548
+ }
549
+
550
+
551
+ /* div icon */
552
+
553
+ .leaflet-div-icon {
554
+ background: #fff;
555
+ border: 1px solid #666;
556
+ }
557
+
558
+
559
+ /* Tooltip */
560
+ /* Base styles for the element that has a tooltip */
561
+ .leaflet-tooltip {
562
+ position: absolute;
563
+ padding: 6px;
564
+ background-color: #fff;
565
+ border: 1px solid #fff;
566
+ border-radius: 3px;
567
+ color: #222;
568
+ white-space: nowrap;
569
+ -webkit-user-select: none;
570
+ -moz-user-select: none;
571
+ -ms-user-select: none;
572
+ user-select: none;
573
+ pointer-events: none;
574
+ box-shadow: 0 1px 3px rgba(0,0,0,0.4);
575
+ }
576
+ .leaflet-tooltip.leaflet-clickable {
577
+ cursor: pointer;
578
+ pointer-events: auto;
579
+ }
580
+ .leaflet-tooltip-top:before,
581
+ .leaflet-tooltip-bottom:before,
582
+ .leaflet-tooltip-left:before,
583
+ .leaflet-tooltip-right:before {
584
+ position: absolute;
585
+ pointer-events: none;
586
+ border: 6px solid transparent;
587
+ background: transparent;
588
+ content: "";
589
+ }
590
+
591
+ /* Directions */
592
+
593
+ .leaflet-tooltip-bottom {
594
+ margin-top: 6px;
595
+ }
596
+ .leaflet-tooltip-top {
597
+ margin-top: -6px;
598
+ }
599
+ .leaflet-tooltip-bottom:before,
600
+ .leaflet-tooltip-top:before {
601
+ left: 50%;
602
+ margin-left: -6px;
603
+ }
604
+ .leaflet-tooltip-top:before {
605
+ bottom: 0;
606
+ margin-bottom: -12px;
607
+ border-top-color: #fff;
608
+ }
609
+ .leaflet-tooltip-bottom:before {
610
+ top: 0;
611
+ margin-top: -12px;
612
+ margin-left: -6px;
613
+ border-bottom-color: #fff;
614
+ }
615
+ .leaflet-tooltip-left {
616
+ margin-left: -6px;
617
+ }
618
+ .leaflet-tooltip-right {
619
+ margin-left: 6px;
620
+ }
621
+ .leaflet-tooltip-left:before,
622
+ .leaflet-tooltip-right:before {
623
+ top: 50%;
624
+ margin-top: -6px;
625
+ }
626
+ .leaflet-tooltip-left:before {
627
+ right: 0;
628
+ margin-right: -12px;
629
+ border-left-color: #fff;
630
+ }
631
+ .leaflet-tooltip-right:before {
632
+ left: 0;
633
+ margin-left: -12px;
634
+ border-right-color: #fff;
635
+ }