The intent of this sample project is to provide a basic layout using the ml-gradle (3.13.0) directory layout and to include the marklogic-geo-data-services project as an mlBundle.
To deploy this project, configure gradle.properties for your environment and run gradle mlDeploy
. The mlDeploy will take care of deploying the MarkLogic database configuration, users, roles, data templates, REST Services, and feature-service configuration. The test data is located under the data directory and is loaded to MarkLogic with the following command, gradle loadExampleData
.
The configured feature-services are available at the following REST paths:
GET http://localhost:8040/LATEST/resources/KoopSearchServices
Content-type: application/json
Authorization: Digest admin admin
POST http://localhost:8040/LATEST/resources/geoQueryService
Content-Type: application/json
Authorization: Digest admin admin
{
"params": {
"id": "GDeltExample",
"layer": 0
}
}
POST http://localhost:8040/LATEST/resources/geoQueryService
Content-Type: application/json
Authorization: Digest admin admin
{
"params": {
"id": "GDeltExample",
"layer": "0",
"method": "query"
},
"query": {
"resultRecordCount": 5,
"orderByFields": "name",
"nbspASC": 0,
"returnGeometry": true
}
}
POST http://localhost:8040/LATEST/resources/geoQueryService
Content-Type: application/json
Authorization: Digest admin admin
{
"params": {
"id": "GDeltExample",
"layer": "0",
"method": "query"
},
"query": {
"resultRecordCount": 5,
"orderByFields": "name",
"nbspASC": 0,
"returnGeometry": false
}
}
POST http://localhost:8040/LATEST/resources/geoQueryService
Content-Type: application/json
Authorization: Digest admin admin
{
"params": {
"id": "GDeltExample",
"layer": "0",
"method": "query"
},
"query": {
"resultRecordCount": 5,
"nbspASC": 0,
"returnCountOnly": true
}
}