Skip to content

Commit

Permalink
Added properties to mysim simulation
Browse files Browse the repository at this point in the history
  • Loading branch information
bpmweel committed Sep 20, 2017
1 parent 49c5b4c commit 18f1f83
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 43 deletions.
7 changes: 6 additions & 1 deletion simcity-slurm/simulations/mysim/makeCircle.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,12 @@
coords
]
},
"properties": {},
"properties": {
'name': 'Circle-1',
'x': x,
'y': y,
'radius': r
},
"id": "xxxx_-8000"
}
]
Expand Down
63 changes: 22 additions & 41 deletions simcity-webservice/resources/mysim.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"id": "matsim",
"title": "matsim",
"id": "mysim",
"title": "mysim",
"featureTypes": {
"MapPoint": {
"id": "SimCity#firestation",
"id": "MySim#MapPoint",
"name": "MapPoint",
"style": {
"drawingMode": "Point",
"iconUri": "data/projects/simcity-demo/images/pin.png",
"iconUri": "data/projects/regis-demo/images/pin.png",
"cornerRadius": 50,
"fillColor": "#ffffff",
"iconWidth": 30,
Expand All @@ -17,70 +17,51 @@
"propertyTypeKeys": "title,notes",
"u": "bower_components/csweb/dist-bower/images/marker.png"
},
"Ward": {
"id": "SimCity#Ward",
"name": "Ward",
"Circle": {
"id": "MySim#Circle",
"name": "Circle",
"style": {
"nameLabel": "ward_name",
"nameLabel": "name",
"drawingMode": "Polygon",
"cornerRadius": 50,
"fillColor": "#999999",
"iconWidth": 30,
"iconHeight": 30,
"strokeColor": "#ffffff"
},
"propertyTypeKeys": "ward_name;ward_no;cmc_mc_nm;tot_p;first_responder;second_responder",
"propertyTypeKeys": "name;x;y;radius",
"u": "bower_components/csweb/dist-bower/images/marker.png"
}
},
"propertyTypeData": {
"ward_no": {
"label": "ward_no",
"type": "text",
"title": "Ward Number",
"visibleInCallOut": true,
"canEdit": false,
"isSearchable": true,
"section": "Metadata"
},
"ward_name": {
"name": {
"label": "Name",
"type": "text",
"title": "Name",
"title": "Circle Name",
"visibleInCallOut": true,
"canEdit": false,
"isSearchable": true,
"section": "Metadata"
"isSearchable": true
},
"cmc_mc_nm": {
"label": "cmc_mc_nm",
"x": {
"label": "x",
"type": "number",
"title": "City Name",
"canEdit": false,
"isSearchable": true,
"title": "X",
"visibleInCallOut": true,
"section": "Metadata"
},
"first_responder": {
"label": "first_responder",
"type": "number",
"title": "First Responder",
"canEdit": false,
"isSearchable": true,
"visibleInCallOut": true
"isSearchable": true
},
"second_responder": {
"label": "second_responder",
"y": {
"label": "y",
"type": "number",
"title": "Second Responder",
"title": "Y",
"canEdit": false,
"isSearchable": true,
"visibleInCallOut": true
},
"tot_p": {
"label": "tot_p",
"radius": {
"label": "radius",
"type": "number",
"title": "Total Population",
"title": "Radius",
"canEdit": false,
"isSearchable": true,
"visibleInCallOut": true
Expand Down
3 changes: 2 additions & 1 deletion simcity-webservice/simulations/mysim.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"command": "~/simulations/mysim/run.sh",
"parallelism": "*",
"resourceTypeUrl": "/explore/resource/mysim",
"defaultFeatureType": "Circle",
"form": [
"radius",
{
Expand All @@ -25,7 +26,7 @@
"properties": {
"radius": {
"type": "number",
"minimum": 1,
"minimum": 0,
"maximum": 50,
"default": 10,
"title": "Radius",
Expand Down

0 comments on commit 18f1f83

Please sign in to comment.