forked from MTSR/mapserver
areas parent
This commit is contained in:
parent
b618867c72
commit
94f54edaac
@ -14,6 +14,7 @@ type GenericPos struct {
|
|||||||
type Area struct {
|
type Area struct {
|
||||||
Owner string `json:"owner"`
|
Owner string `json:"owner"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
|
Parent int `json:"parent"`
|
||||||
Pos1 *GenericPos `json:"pos1"`
|
Pos1 *GenericPos `json:"pos1"`
|
||||||
Pos2 *GenericPos `json:"pos2"`
|
Pos2 *GenericPos `json:"pos2"`
|
||||||
}
|
}
|
||||||
@ -41,6 +42,9 @@ func Parse(data []byte) ([]*Area, error) {
|
|||||||
a := Area{}
|
a := Area{}
|
||||||
a.Name = entry["name"].(string)
|
a.Name = entry["name"].(string)
|
||||||
a.Owner = entry["owner"].(string)
|
a.Owner = entry["owner"].(string)
|
||||||
|
if entry["parent"] != nil {
|
||||||
|
a.Parent = entry["owner"].(int)
|
||||||
|
}
|
||||||
|
|
||||||
p1 := GenericPos{}
|
p1 := GenericPos{}
|
||||||
pos1 := entry["pos1"].(map[string]interface{})
|
pos1 := entry["pos1"].(map[string]interface{})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user