Tuesday, 14 March 2017

TypeError: GeoJSON is not a constructor

Based on the suggestion given here

http://stackoverflow.com/a/42763849/4732633

I tried the example provided here

https://github.com/RideAmigosCorp/mongoose-geojson-schema

But I kept getting the following error

TypeError: GeoJSON is not a constructor

I have tried the following code

var test = new GeoJSON({
any: {
 type: "Point",
 point: [-113.806458, 44.847784]
},
point: {
 type: "Point",
 coordinates: [12.123456, 13.134578]
}
});

I also tried the following

var pointData = {
point: {
type: "Point",
coordinates: [12.123456, 13.134578]
}
};
var geoLocation= new GeoJSON(pointData);



via Rahul Ganguly

No comments:

Post a Comment