MapRules UI v0.0.1
October 12, 2018 ยท View on GitHub
MapRules UI v0.0.1
UI for Creating Custom Mapping Presets and Validation rules
CreateMapRule
Create new MapRules config
GET /new
EditMapRule
Edit MapRules config
GET /:id/edit
Path Parameters
| Name | Type | Description |
|---|---|---|
| id | String | MapRules configuration id |
Query Parameters
| Name | Type | Description |
|---|---|---|
| name | String | MapRules name initializes to this value |
| nav | String | show/hide navigation bar and submit button Default value: showAllowed values: [hide,show] |
Examples
iFrame integration:
var win = document.getElementById('editMapRulesFrame').contentWindow;
win.postMessage("save:" + $("#configId").val(), '*');
window.addEventListener('message', function(event) {
if(event.data && event.data.indexOf("Error") != -1){
alert(event.data);
}else{
if(!$("#configId").val() || $("#configId").val() == ""){
$("#configId").val(event.data);
var configUrl = map_rules_url + "/" + $('#configId').val() + "/instructions";
$("#viewMapRulesFrame").attr("src", configUrl);
}
$("#editMapRulesModal").modal('hide');
$("#viewMapRulesFrame")[0].src = $("#viewMapRulesFrame")[0].src;
}
});
ViewMapRule
Start Editors with MapRules
GET /:id/start
Parameter Parameters
| Name | Type | Description |
|---|---|---|
| id | String | MapRules configuration id |
View MapRules instructions
GET /:id/instructions
Path Parameters
| Name | Type | Description |
|---|---|---|
| id | String | MapRules configuration id |
Query Parameters
| Name | Type | Description |
|---|---|---|
| nav | String | nav show/hide navigation bar Default value: showAllowed values: [hide,show] |