我可以在我当前的项目中使用第三个维度,它强烈涉及google-maps和django。我该如何处理?
class Waypoint(models.Model):
latlng = models.PointField()
>>> p = Point( 5, 10, 20)
<Point object at Ox...>
>>> p.kml
'<Point><coordinates>5.0,10.0,20.0</coordinates></Point>'
>>> w = Waypoint.objects.all()[0]
<Waypoint: Waypoint object>
>>> w.latlng = p
>>> w.latlng.kml
'<Point><coordinates>5.0,10.0,20.0</coordinates></Point>'
>>> w.save()
>>> w = Waypoint.objects.all()[0]
<Waypoint: Waypoint object>
>>> w.latlng.kml
'<Point><coordinates>5.0,10.0,0</coordinates></Point>'
^
注意忽略第三个diemsnion。哎呀!