[#26] Fix broken markers on debug mode
This commit is contained in:
parent
19ea9b1753
commit
063a1b8530
|
@ -25,6 +25,9 @@ this.ckan.module('dataset-map', function (jQuery, _) {
|
|||
|
||||
this.extent = this.el.data('extent');
|
||||
|
||||
// hack to make leaflet use a particular location to look for images
|
||||
L.Icon.Default.imagePath = this.options.site_url + 'js/vendor/leaflet/images';
|
||||
|
||||
jQuery.proxyAll(this, /_on/);
|
||||
this.el.ready(this._onReady);
|
||||
|
||||
|
|
|
@ -20,6 +20,9 @@ ckan.module('geojsonpreview', function (jQuery, _) {
|
|||
self.el.append($("<div></div>").attr("id","map"));
|
||||
self.map = L.map('map');
|
||||
|
||||
// hack to make leaflet use a particular location to look for images
|
||||
L.Icon.Default.imagePath = this.options.site_url + 'js/vendor/leaflet/images';
|
||||
|
||||
var mapUrl = "http://otile{s}.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.png";
|
||||
var osmAttribution = 'Map data © 2011 OpenStreetMap contributors, Tiles Courtesy of <a href="http://www.mapquest.com/" target="_blank">MapQuest</a> <img src="http://developer.mapquest.com/content/osm/mq_logo.png">';
|
||||
var bg = new L.TileLayer(mapUrl, {maxZoom: 18, attribution: osmAttribution, subdomains: '1234'});
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
{% resource g.main_css[6:] %}
|
||||
{% endblock %}
|
||||
|
||||
<div data-module="geojsonpreview" id="data-preview">
|
||||
<div data-module="geojsonpreview" id="data-preview" data-module-site_url="{{ h.dump_json(h.url('/', locale='default', qualified=true)) }}">
|
||||
<h4 class="loading-dialog">
|
||||
<div class="loading-spinner"></div>
|
||||
<div class="left">{{ _('Loading...') }}</div>
|
||||
|
|
|
@ -9,7 +9,7 @@ extent
|
|||
{% snippet "spatial/snippets/dataset_map_base.html", extent=extent %}
|
||||
|
||||
#}
|
||||
<div class="dataset-map" data-module="dataset-map" data-extent="{{ extent }}">
|
||||
<div class="dataset-map" data-module="dataset-map" data-extent="{{ extent }}" data-module-site_url="{{ h.dump_json(h.url('/', locale='default', qualified=true)) }}">
|
||||
<div id="dataset-map-container"></div>
|
||||
<div id="dataset-map-attribution">
|
||||
<div>Map data CC-BY-SA by <a href="http://openstreetmap.org">OpenStreetMap</a></div>
|
||||
|
|
Loading…
Reference in New Issue