Permalink
Browse files

toGeoJSON for FeatureGroup

  • Loading branch information...
1 parent d91ce83 commit ffba52e0a16eb55e34116c616692f65a8a2160bd @tnightingale committed Nov 2, 2012
Showing with 7 additions and 11 deletions.
  1. +3 −3 example/Leaflet.widget.html
  2. +4 −0 src/layer/FeatureGroup.js
  3. +0 −4 src/layer/MultiPolygon.js
  4. +0 −4 src/layer/MultiPolyline.js
@@ -1,16 +1,16 @@
<html>
<head>
<title>Leaflet</title>
- <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.4.4/leaflet.css" />
+ <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.4.5/leaflet.css" />
<!--[if lte IE 8]>
- <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.4.4/leaflet.ie.css" />
+ <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.4.5/leaflet.ie.css" />
<![endif]-->
<link rel="stylesheet" href="http://jacobtoye.github.com/Leaflet.draw/leaflet.draw.css" />
<link rel="stylesheet" href="../dist/Leaflet.select.css" />
<link rel="stylesheet" href="../dist/Leaflet.widget.css" />
<!-- <link rel="stylesheet" href="../dist/Leaflet.widget.min.css" /> -->
- <script src="http://cdn.leafletjs.com/leaflet-0.4.4/leaflet.js"></script>
+ <script src="http://cdn.leafletjs.com/leaflet-0.4.5/leaflet.js"></script>
<script src="http://jacobtoye.github.com/Leaflet.draw/leaflet.draw.js"></script>
<script src="../src/util/GeoJSONUtil.js"></script>
<script src="../src/layer/WidgetFeatureGroup.js"></script>
@@ -15,5 +15,9 @@ L.FeatureGroup.include({
type: "MultiPoint",
coordinates: coords
};
+ },
+
+ toGeoJSON: function () {
+ return L.GeoJSONUtil.feature(this.toGeometry());
}
});
@@ -10,9 +10,5 @@ L.MultiPolygon.include({
type: "MultiPolygon",
coordinates: coords
};
- },
-
- toGeoJSON: function () {
- return L.GeoJSONUtil.feature(this.toGeometry());
}
});
@@ -10,9 +10,5 @@ L.MultiPolyline.include({
type: "MultiLineString",
coordinates: coords
};
- },
-
- toGeoJSON: function () {
- return L.GeoJSONUtil.feature(this.toGeometry());
}
});

0 comments on commit ffba52e

Please sign in to comment.