Add spatial view with REST API


#1

HI i would like to add spatial view with REST API, where i have additional views on the same document, so i think i have to correct command, i didnt get error, but still i cannot see that in the web console.
could you help me here?

here is the command :

curl -X PUT -H’content-type:application/json’ -d ‘{ “views”:{ “fenceKey”:{ “map”:“function(doc, meta) {emit(meta.id, null);}” }, “pendingForCreate”:{ “map”:“function(doc, meta) {if(doc.fenceStatus==0) emit(doc.id, null);}” }, “pendingForDelete”:{ “map”:“function(doc, meta) {if(doc.fenceStatus==1) emit(doc.id, null);}” } }, “fenceCoordinates”:{ “spatial”:{ “map”:“function(doc) {emit({“type”: “Point”, “coordinates”: [doc.center.lng, doc.center.lat]}, null);}” } } }’ http://$server_api_1/fence_details/_design/fence

got answer: {“ok”:true,“id”:"_design/fence"}

bot nothing is appear at the web console.

whats get wrong?