How to create a HTML world map with GeoDjango ?

Posted by pierre-guillaume-degans on Stack Overflow See other posts from Stack Overflow or by pierre-guillaume-degans
Published on 2010-06-05T18:04:28Z Indexed on 2010/06/05 18:12 UTC
Read the original article Hit count: 272

Filed under:
|
|
|
|

The GeoDjango tutorial explains how to insert world borders into a spatial database.

I would like to create a world Map in HTML with these data, with both map and area tags. Something like that.

I just don't know how to retrieve the coordinates for each country (required for the area's coords attribute).

from world.models import WorldBorders

for country in WorldBorders.objects.all():
    print u'<area shape="poly" title="%s" alt="%s" coords="%s" />' % (v.name, v.name, "???")

Thanks !

© Stack Overflow or respective owner

Related posts about python

Related posts about html