Skip to content

Commit

Permalink
Added LeafDoc for toGeoJSON's precision - Issue Leaflet#6344 (Leaflet…
Browse files Browse the repository at this point in the history
…#6375)

* Added LeafDoc for toGeoJSON's precision

* Added LeafDoc for toGeoJSON's precision argument
  • Loading branch information
rkatka authored and Schleuse committed Dec 3, 2019
1 parent 0d61e2d commit 63872a1
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions src/layer/GeoJSON.js
Expand Up @@ -298,19 +298,25 @@ var PointToGeoJSON = {
};

// @namespace Marker
// @method toGeoJSON(): Object
// @method toGeoJSON(precision?: Number): Object
// `precision` is the number of decimal places for coordinates.
// The default value is 6 places.
// Returns a [`GeoJSON`](http://en.wikipedia.org/wiki/GeoJSON) representation of the marker (as a GeoJSON `Point` Feature).
Marker.include(PointToGeoJSON);

// @namespace CircleMarker
// @method toGeoJSON(): Object
// @method toGeoJSON(precision?: Number): Object
// `precision` is the number of decimal places for coordinates.
// The default value is 6 places.
// Returns a [`GeoJSON`](http://en.wikipedia.org/wiki/GeoJSON) representation of the circle marker (as a GeoJSON `Point` Feature).
Circle.include(PointToGeoJSON);
CircleMarker.include(PointToGeoJSON);


// @namespace Polyline
// @method toGeoJSON(): Object
// @method toGeoJSON(precision?: Number): Object
// `precision` is the number of decimal places for coordinates.
// The default value is 6 places.
// Returns a [`GeoJSON`](http://en.wikipedia.org/wiki/GeoJSON) representation of the polyline (as a GeoJSON `LineString` or `MultiLineString` Feature).
Polyline.include({
toGeoJSON: function (precision) {
Expand All @@ -326,7 +332,9 @@ Polyline.include({
});

// @namespace Polygon
// @method toGeoJSON(): Object
// @method toGeoJSON(precision?: Number): Object
// `precision` is the number of decimal places for coordinates.
// The default value is 6 places.
// Returns a [`GeoJSON`](http://en.wikipedia.org/wiki/GeoJSON) representation of the polygon (as a GeoJSON `Polygon` or `MultiPolygon` Feature).
Polygon.include({
toGeoJSON: function (precision) {
Expand Down Expand Up @@ -362,7 +370,9 @@ LayerGroup.include({
});
},

// @method toGeoJSON(): Object
// @method toGeoJSON(precision?: Number): Object
// `precision` is the number of decimal places for coordinates.
// The default value is 6 places.
// Returns a [`GeoJSON`](http://en.wikipedia.org/wiki/GeoJSON) representation of the layer group (as a GeoJSON `FeatureCollection`, `GeometryCollection`, or `MultiPoint`).
toGeoJSON: function (precision) {

Expand Down

0 comments on commit 63872a1

Please sign in to comment.