Permalink
Browse files

Merge branch 'cloudmade' into giscloud

Conflicts:
	dist/leaflet-src.js
	dist/leaflet.js
  • Loading branch information...
2 parents f3ff2da + d1096c4 commit 6e384bf4e7e9d09e77ce5e323ce7071a39ffea1a @dravnic dravnic committed Apr 19, 2012
View
@@ -1,6 +1,6 @@
<img src="http://leaflet.cloudmade.com/docs/images/logo.png" alt="Leaflet" />
-Leaflet is a modern, lightweight open-source JavaScript library for mobile-friendly interactive maps, developed by [CloudMade](http://cloudmade.com) to form the core of its next generation JavaScript API. Weighting just about 21kb of gzipped JS code, it still has all the [features](http://leaflet.cloudmade.com/features.html) you will ever need for you web mapping needs while providing a fast, smooth, pleasant user experience.
+Leaflet is a modern, lightweight open-source JavaScript library for mobile-friendly interactive maps, developed by [CloudMade](http://cloudmade.com) to form the core of its next generation JavaScript API. Weighting just about 21kb of gzipped JS code, it still has all the [features](http://leaflet.cloudmade.com/features.html) you will ever need for your web mapping needs while providing a fast, smooth, pleasant user experience.
It is built from the ground up to work efficiently and smoothly on both desktop and mobile platforms like iOS and Android, utilizing cutting-edge technologies included in HTML5 and CSS3, focusing on usability, performance, small size, [A-grade](http://developer.yahoo.com/yui/articles/gbs/) browser support, flexibility and [easy to use API](http://leaflet.cloudmade.com/reference.html). The OOP-based code of the library is designed to be modular, extensible and very easy to understand.
View
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Leaflet geolocation debug page</title>
+
+ <link rel="stylesheet" href="../../dist/leaflet.css" />
+ <!--[if lte IE 8]><link rel="stylesheet" href="../../dist/leaflet.ie.css" /><![endif]-->
+
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+ <link rel="stylesheet" href="../css/screen.css" />
+
+ <script src="../leaflet-include.js"></script>
+</head>
+<body>
+
+ <div id="map"></div>
+
+ <script type="text/javascript">
+
+ var cloudmadeUrl = 'http://{s}.tile.cloudmade.com/BC9A493B41014CAABB98F0471D759707/997/256/{z}/{x}/{y}.png',
+ cloudmadeAttribution = 'Map data &copy; 2011 OpenStreetMap contributors, Imagery &copy; 2011 CloudMade',
+ cloudmade = new L.TileLayer(cloudmadeUrl, {maxZoom: 18, attribution: cloudmadeAttribution});
+
+ var map = new L.Map('map', {zoom: 15, layers: [cloudmade]});
+
+ function logEvent(e) { console.log(e.type); }
+ map.on('locationerror', logEvent);
+ map.on('locationfound', logEvent);
+
+ map.locate({setView: true});
+
+ </script>
+</body>
+</html>
@@ -46,6 +46,7 @@ describe("Class", function() {
expect(method).toHaveBeenCalled();
});
+ /* superclass deprecated
it("should grant the ability to call parent methods, including constructor", function() {
var Klass2 = Klass.extend({
initialize: function() {},
@@ -60,7 +61,7 @@ describe("Class", function() {
b.constructor.superclass.bar.call(this);
expect(method).toHaveBeenCalled();
- });
+ }); */
it("should support static properties", function() {
expect(Klass.bla).toEqual(1);
@@ -123,6 +124,7 @@ describe("Class", function() {
});
});
+ /* superclass deprecated
it("should have working superclass access with inheritance level > 2", function() {
var constructor2 = jasmine.createSpy("Klass2 constructor"),
constructor3 = jasmine.createSpy("Klass3 constructor");
@@ -149,5 +151,6 @@ describe("Class", function() {
expect(constructor2).toHaveBeenCalled();
expect(constructor).toHaveBeenCalled();
});
+ */
});
});
View
@@ -17,7 +17,7 @@ L.Util = {
},
bind: function (fn, obj) { // (Function, Object) -> Function
- var args = Array.prototype.slice.call(arguments, 2);
+ var args = arguments.length > 2 ? Array.prototype.slice.call(arguments, 2) : null;
return function () {
return fn.apply(obj, args || arguments);
};
View
@@ -98,7 +98,7 @@ L.DomUtil = {
setOpacity: function (el, value) {
if (L.Browser.ie) {
- el.style.filter = 'alpha(opacity=' + Math.round(value * 100) + ')';
+ el.style.filter = value !== 1 ? 'alpha(opacity=' + Math.round(value * 100) + ')' : '';
} else {
el.style.opacity = value;
}
@@ -73,6 +73,9 @@ L.Circle = L.Path.extend({
},
_checkIfEmpty: function () {
+ if (!this._map) {
+ return false;
+ }
var vp = this._map._pathViewport,
r = this._radius,
p = this._point;
@@ -104,7 +104,7 @@ L.Polyline = L.Path.extend({
},
_initEvents: function () {
- L.Polyline.superclass._initEvents.call(this);
+ L.Path.prototype._initEvents.call(this);
},
_getPathPartStr: function (points) {

0 comments on commit 6e384bf

Please sign in to comment.