Sha256: ab382017a61e60dec60e8162e5101a5c1a97c0a27dc61f3f5fc760543e0e8eed

Contents?: true

Size: 704 Bytes

Versions: 3

Compression:

Stored size: 704 Bytes

Contents

//= depend_on_asset "marker-icon-2x.png"
//= depend_on_asset "marker-shadow.png"
//= depend_on_asset "marker-icon.png"
//= require leaflet-src
<% icons = ['icon-2x.png', 'shadow.png', 'icon.png'] %>

L.Icon.Default = L.Icon.Default.extend({
	_getIconUrl: function (name) {
		var key = name + 'Url';

		if (this.options[key]) {
			return this.options[key];
		}

		var paths = <%= Hash[icons.map{|i| [i, asset_path('marker-' + i)]}].to_json %>;
		var path = paths[name + (L.Browser.retina && name === 'icon' ? '-2x' : '') + '.png'];

		if (!path) {
			throw new Error('Couldn\'t find path for image ' + path + '.');
		}

		return path;
	}
});

L.Icon.Default.imagePath = (function () {
  return '';
}());

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
leaflet-rails-1.0.0.pre.rc3 vendor/assets/javascripts/leaflet.js.erb
leaflet-rails-1.0.0.pre.rc2 vendor/assets/javascripts/leaflet.js.erb
leaflet-rails-1.0.0.pre.rc1 vendor/assets/javascripts/leaflet.js.erb