< Potlatch 1
Potlatch 1/Point array
Potlatch treats a way as an ordered list of points. This ordered list is stored within Potlatch (both the SWF client and the Ruby AMF server script) as an array. Each element of the array represents one point.
A point 'p', in turn, comprises the following:
- p[0]=x co-ordinate (projected)
- p[1]=y co-ordinate (projected)
- p[2]=node ID
- p[3]=not currently used
- p[4]=hash of node keys/values
So to get the node ID of the fourth element (i.e. subscript 3) in a way, you would use the following ActionScript:
- way.path[3][2]
This article is issued from Openstreetmap. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.