Javascript Sails js和GeoJSON格式
有人知道如何在sails js模型中存储GEOJSON吗? 我想在sails js模型中存储特性和点Javascript Sails js和GeoJSON格式,javascript,ecmascript-6,leaflet,sails.js,Javascript,Ecmascript 6,Leaflet,Sails.js,有人知道如何在sails js模型中存储GEOJSON吗? 我想在sails js模型中存储特性和点 var geojsonFeature = { "type": "Feature", "properties": { "name": "Coors Field", "amenity": "Baseball Stadium", "popupContent": "This is where the Rockies play!" }, "geometry": { "typ
var geojsonFeature = {
"type": "Feature",
"properties": {
"name": "Coors Field",
"amenity": "Baseball Stadium",
"popupContent": "This is where the Rockies play!"
},
"geometry": {
"type": "Point",
"coordinates": [-104.99404, 39.75621]
}
}) 在中,您可以发现Sail的吃水线(Sail中的底层ORM)支持5种类型
- 串
- 数
- 布尔值
- json
- 参考号
属性:{
类型:{
键入:“字符串”,
枚举:['Feature','This','That','Other'],//不需要。。。
},
特性:{
键入:“json”
},
几何图形:{
键入:“json”
}
}