better all on maps.
This commit is contained in:
1 parent
0da4c99d9f
commit
79da771597
1 file changed
+13
-3
@@ -1,9 +1,14 @@
|
||||
root = this;
|
||||
|
||||
|
||||
|
||||
mapCenter =
|
||||
lat: 46.1227
|
||||
lng: -72.6169
|
||||
zoom: 7
|
||||
|
||||
|
||||
|
||||
getSingleDataUrl = (routeParams) ->
|
||||
url = "/api/#{ routeParams.server }/#{ routeParams.database }/#{ routeParams.collection }"
|
||||
if routeParams.query
|
||||
@@ -21,14 +26,19 @@ getDocumentUrl = (routeParams, id) ->
|
||||
|
||||
transformListOfGeoJsonToGeometryCollection = (resData, routeParams) ->
|
||||
ret =
|
||||
type: "GeometryCollection"
|
||||
geometries: []
|
||||
type: "FeatureCollection"
|
||||
features: []
|
||||
for doc in resData.document
|
||||
geojson = doc[routeParams.key]
|
||||
if not geojson.properties
|
||||
geojson.properties = {}
|
||||
geojson.properties["_vulture_url_link"] = getDocumentUrl(routeParams, doc._id)
|
||||
ret.geometries.push(geojson)
|
||||
feature =
|
||||
type: "Feature"
|
||||
geometry: geojson,
|
||||
properties:
|
||||
"_vulture_url_link": getDocumentUrl(routeParams, doc._id)
|
||||
ret.features.push(geojson)
|
||||
return ret
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user