In 12 hours or so I'm going on a week long vacation, before I go, I thought this could be useful to some people here, even if just as an example, now that the DAL supports geo stuff.
This small plugin provides a location picker and a validator for geometry (NOT geography) fields that actually represent real points on the map.
The usage is quite simple and here's an example:
from plugin_location_picker import location_widget, IS_GEOLOCATION
db.define_table('point',
Field('name'),
Field('coord', 'geometry()', requires=IS_GEOLOCATION(), widget=location_widget())
)
Here's a more complex example that makes the map start in the center of Lisbon (Everyone should use this):
from plugin_location_picker import location_widget, IS_GEOLOCATION
db.define_table('point',
Field('name'),
Field('coord', 'geometry()', requires=IS_GEOLOCATION(), widget=location_widget(map_options={'center': {'lat': 38.725275, 'lng': -9.150028}}, marker_options={'position': {'lat': 38.725275, 'lng': -9.150028}}))
)
Finally, go to appadmin and add points to your point table, verify that you now have an awesome widget (well the bootstrap 3 classes probably need improvement so the appearance may be odd).
Also, remember to make sure your backend is one of those supported by the geoDAL sqlite/spatialite postgres/postgis or mssql. I actually only tested this with postgresql and postgis so results may vary.
Respect the BEER-WARE license please.