update build with regression fixes
This commit is contained in:
parent
b2adb29cf1
commit
b1db46a307
@ -5,9 +5,9 @@
|
|||||||
|
|
||||||
<link rel="stylesheet" href="../../dist/leaflet.css" />
|
<link rel="stylesheet" href="../../dist/leaflet.css" />
|
||||||
<!--[if lte IE 8]><link rel="stylesheet" href="../../dist/leaflet.ie.css" /><![endif]-->
|
<!--[if lte IE 8]><link rel="stylesheet" href="../../dist/leaflet.ie.css" /><![endif]-->
|
||||||
|
|
||||||
<link rel="stylesheet" href="../css/screen.css" />
|
<link rel="stylesheet" href="../css/screen.css" />
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
L_PREFER_CANVAS = true; // experimental
|
L_PREFER_CANVAS = true; // experimental
|
||||||
</script>
|
</script>
|
||||||
@ -24,36 +24,36 @@
|
|||||||
<script>
|
<script>
|
||||||
var cloudmadeUrl = 'http://{s}.tile.cloudmade.com/BC9A493B41014CAABB98F0471D759707/997/256/{z}/{x}/{y}.png',
|
var cloudmadeUrl = 'http://{s}.tile.cloudmade.com/BC9A493B41014CAABB98F0471D759707/997/256/{z}/{x}/{y}.png',
|
||||||
cloudmade = new L.TileLayer(cloudmadeUrl, {maxZoom: 18});
|
cloudmade = new L.TileLayer(cloudmadeUrl, {maxZoom: 18});
|
||||||
|
|
||||||
for (var i = 0, latlngs = [], len = route.length; i < len; i++) {
|
for (var i = 0, latlngs = [], len = route.length; i < len; i++) {
|
||||||
latlngs.push(new L.LatLng(route[i][0], route[i][1]));
|
latlngs.push(new L.LatLng(route[i][0], route[i][1]));
|
||||||
}
|
}
|
||||||
var path = new L.Polyline(latlngs);
|
var path = new L.Polyline(latlngs);
|
||||||
|
|
||||||
var map = new L.Map('map', {layers: [cloudmade]});
|
var map = new L.Map('map', {layers: [cloudmade]});
|
||||||
|
|
||||||
var group = new L.LayerGroup();
|
var group = new L.LayerGroup();
|
||||||
|
|
||||||
map.fitBounds(new L.LatLngBounds(latlngs));
|
map.fitBounds(new L.LatLngBounds(latlngs));
|
||||||
|
|
||||||
var circleLocation = new L.LatLng(51.508, -0.11),
|
var circleLocation = new L.LatLng(51.508, -0.11),
|
||||||
circleOptions = {
|
circleOptions = {
|
||||||
color: 'red',
|
color: 'red',
|
||||||
fillColor: 'yellow',
|
fillColor: 'yellow',
|
||||||
fillOpacity: 0.7
|
fillOpacity: 0.7
|
||||||
};
|
};
|
||||||
|
|
||||||
var circle = new L.Circle(circleLocation, 500000, circleOptions),
|
var circle = new L.Circle(circleLocation, 500000, circleOptions),
|
||||||
circleMarker = new L.CircleMarker(circleLocation, {fillColor: 'blue', fillOpacity: 1, stroke: false});
|
circleMarker = new L.CircleMarker(circleLocation, {fillColor: 'blue', fillOpacity: 1, stroke: false});
|
||||||
|
|
||||||
group.addLayer(circle).addLayer(circleMarker);
|
group.addLayer(circle).addLayer(circleMarker);
|
||||||
|
|
||||||
circle.bindPopup('I am a circle');
|
circle.bindPopup('I am a circle');
|
||||||
circleMarker.bindPopup('I am a circle marker');
|
circleMarker.bindPopup('I am a circle marker');
|
||||||
|
|
||||||
group.addLayer(path);
|
group.addLayer(path);
|
||||||
path.bindPopup('I am a polyline');
|
path.bindPopup('I am a polyline');
|
||||||
|
|
||||||
var p1 = latlngs[0],
|
var p1 = latlngs[0],
|
||||||
p2 = latlngs[parseInt(len/4)],
|
p2 = latlngs[parseInt(len/4)],
|
||||||
p3 = latlngs[parseInt(len/3)],
|
p3 = latlngs[parseInt(len/3)],
|
||||||
@ -66,14 +66,14 @@
|
|||||||
h3 = new L.LatLng(p3.lat, p3.lng),
|
h3 = new L.LatLng(p3.lat, p3.lng),
|
||||||
h4 = new L.LatLng(p4.lat, p4.lng),
|
h4 = new L.LatLng(p4.lat, p4.lng),
|
||||||
h5 = new L.LatLng(p5.lat, p5.lng);
|
h5 = new L.LatLng(p5.lat, p5.lng);
|
||||||
|
|
||||||
h1.lng += 20;
|
h1.lng += 20;
|
||||||
h2.lat -= 5;
|
h2.lat -= 5;
|
||||||
h3.lat -= 5;
|
h3.lat -= 5;
|
||||||
h4.lng -= 10;
|
h4.lng -= 10;
|
||||||
h5.lng -= 8;
|
h5.lng -= 8;
|
||||||
h5.lat += 10;
|
h5.lat += 10;
|
||||||
|
|
||||||
var holePoints = [h5, h4, h3, h2, h1];
|
var holePoints = [h5, h4, h3, h2, h1];
|
||||||
|
|
||||||
var polygon = new L.Polygon([polygonPoints, holePoints], {
|
var polygon = new L.Polygon([polygonPoints, holePoints], {
|
||||||
@ -81,9 +81,9 @@
|
|||||||
color: 'green'
|
color: 'green'
|
||||||
});
|
});
|
||||||
group.addLayer(polygon);
|
group.addLayer(polygon);
|
||||||
|
|
||||||
polygon.bindPopup('I am a polygon');
|
polygon.bindPopup('I am a polygon');
|
||||||
|
|
||||||
map.addLayer(group);
|
map.addLayer(group);
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
@ -16,20 +16,12 @@
|
|||||||
<div id="map"></div>
|
<div id="map"></div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
var map = L.map('map')
|
var map = L.map('map');
|
||||||
.setView([51.505, -0.09], 13);
|
|
||||||
|
|
||||||
var cloudmade = L.tileLayer('http://{s}.tile.cloudmade.com/{key}/{styleId}/256/{z}/{x}/{y}.png', {
|
|
||||||
attribution: 'Map data © 2011 OpenStreetMap contributors, Imagery © 2011 CloudMade',
|
|
||||||
maxZoom: 18,
|
|
||||||
key: 'BC9A493B41014CAABB98F0471D759707',
|
|
||||||
styleId: 997
|
|
||||||
}).addTo(map);
|
|
||||||
|
|
||||||
var marker = L.marker([51.5, -0.09])
|
var marker = L.marker([51.5, -0.09])
|
||||||
.bindPopup("<b>Hello world!</b><br />I am a popup.")
|
.bindPopup("<b>Hello world!</b><br />I am a popup.")
|
||||||
.addTo(map)
|
.addTo(map);
|
||||||
.openPopup();
|
//.openPopup();
|
||||||
|
|
||||||
var circle = L.circle([51.508, -0.11], 500, {color: '#f03', opacity: 0.7})
|
var circle = L.circle([51.508, -0.11], 500, {color: '#f03', opacity: 0.7})
|
||||||
.bindPopup("I am a circle.")
|
.bindPopup("I am a circle.")
|
||||||
@ -41,6 +33,16 @@
|
|||||||
[51.51, -0.047]])
|
[51.51, -0.047]])
|
||||||
.bindPopup("I am a polygon.")
|
.bindPopup("I am a polygon.")
|
||||||
.addTo(map);
|
.addTo(map);
|
||||||
|
|
||||||
|
map.setView([51.505, -0.09], 13);
|
||||||
|
|
||||||
|
var cloudmade = L.tileLayer('http://{s}.tile.cloudmade.com/{key}/{styleId}/256/{z}/{x}/{y}.png', {
|
||||||
|
attribution: 'Map data © 2011 OpenStreetMap contributors, Imagery © 2011 CloudMade',
|
||||||
|
maxZoom: 18,
|
||||||
|
key: 'BC9A493B41014CAABB98F0471D759707',
|
||||||
|
styleId: 997
|
||||||
|
}).addTo(map);
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
9
dist/leaflet-src.js
vendored
9
dist/leaflet-src.js
vendored
@ -3588,7 +3588,9 @@ L.Path = L.Class.extend({
|
|||||||
this.projectLatlngs();
|
this.projectLatlngs();
|
||||||
this._updatePath();
|
this._updatePath();
|
||||||
|
|
||||||
this._map._pathRoot.appendChild(this._container);
|
if (this._container) {
|
||||||
|
this._map._pathRoot.appendChild(this._container);
|
||||||
|
}
|
||||||
|
|
||||||
map.on({
|
map.on({
|
||||||
'viewreset': this.projectLatlngs,
|
'viewreset': this.projectLatlngs,
|
||||||
@ -4520,6 +4522,9 @@ L.Polyline = L.Path.extend({
|
|||||||
_convertLatLngs: function (latlngs) {
|
_convertLatLngs: function (latlngs) {
|
||||||
var i, len;
|
var i, len;
|
||||||
for (i = 0, len = latlngs.length; i < len; i++) {
|
for (i = 0, len = latlngs.length; i < len; i++) {
|
||||||
|
if (latlngs[i] instanceof Array && typeof latlngs[i][0] !== 'number') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
latlngs[i] = L.latLng(latlngs[i]);
|
latlngs[i] = L.latLng(latlngs[i]);
|
||||||
}
|
}
|
||||||
return latlngs;
|
return latlngs;
|
||||||
@ -4674,7 +4679,7 @@ L.Polygon = L.Polyline.extend({
|
|||||||
L.Polyline.prototype.initialize.call(this, latlngs, options);
|
L.Polyline.prototype.initialize.call(this, latlngs, options);
|
||||||
|
|
||||||
if (latlngs && (latlngs[0] instanceof Array) && (typeof latlngs[0][0] !== 'number')) {
|
if (latlngs && (latlngs[0] instanceof Array) && (typeof latlngs[0][0] !== 'number')) {
|
||||||
this._latlngs = latlngs[0];
|
this._latlngs = this._convertLatLngs(latlngs[0]);
|
||||||
this._holes = latlngs.slice(1);
|
this._holes = latlngs.slice(1);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
2
dist/leaflet.js
vendored
2
dist/leaflet.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user