I could use a third dimension in my current project, which strongly involves google-maps and django. How do I deal with this?
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>'
^
Note third diemsnion is ignored. GRRR!
From stackoverflow
-
Here is the answer: http://groups.google.com/group/geodjango/browse_thread/thread/12431e87ea78248d#
TokenMacGuy : I'll give this a try.
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.