add Circle & CircleMarker toGeoJSON
Vladimir Agafonkin
10 years ago
25 | 25 |
describe("L.Marker#toGeoJSON", function () {
|
26 | 26 |
it("returns a Point object", function () {
|
27 | 27 |
var marker = new L.Marker([10, 20]);
|
|
28 |
expect(marker.toGeoJSON().geometry).to.eql({
|
|
29 |
type: 'Point',
|
|
30 |
coordinates: [20, 10]
|
|
31 |
});
|
|
32 |
});
|
|
33 |
});
|
|
34 |
|
|
35 |
describe("L.Circle#toGeoJSON", function () {
|
|
36 |
it("returns a Point object", function () {
|
|
37 |
var circle = new L.Circle([10, 20], 100);
|
|
38 |
expect(circle.toGeoJSON().geometry).to.eql({
|
|
39 |
type: 'Point',
|
|
40 |
coordinates: [20, 10]
|
|
41 |
});
|
|
42 |
});
|
|
43 |
});
|
|
44 |
|
|
45 |
describe("L.CircleMarker#toGeoJSON", function () {
|
|
46 |
it("returns a Point object", function () {
|
|
47 |
var marker = new L.CircleMarker([10, 20]);
|
28 | 48 |
expect(marker.toGeoJSON().geometry).to.eql({
|
29 | 49 |
type: 'Point',
|
30 | 50 |
coordinates: [20, 10]
|