Saving Google Maps Markers To Database

287 views
Skip to first unread message

Kelvin Kibet

unread,
Mar 25, 2015, 7:45:16 PM3/25/15
to web...@googlegroups.com
I need to save google maps markers to database but have searched and could not find a way to implement it with web2py.
Will gladly appreciate any help I can get 

Leonel Câmara

unread,
Mar 25, 2015, 8:54:00 PM3/25/15
to web...@googlegroups.com

Paolo Valleri

unread,
Mar 26, 2015, 3:12:24 AM3/26/15
to web...@googlegroups.com
If you have to show the marker (and maybe a tooltip) you can consider to use a geojson layer.
I've written an example for leaflet, but the same can be applied to google maps (https://developers.google.com/maps/documentation/javascript/datalayer)

For storing the coordinates you have two alternatives:
- storing as double fields (one for latitude, one for longitude)
- storing as one geometry field
The geometry field allows you to run spatial queries.

Paolo

Manuele Pesenti

unread,
Mar 30, 2015, 5:30:33 AM3/30/15
to web...@googlegroups.com
Il 26/03/15 00:45, Kelvin Kibet ha scritto:
> I need to save google maps markers to database but have searched and
> could not find a way to implement it with web2py.
> Will gladly appreciate any help I can get
I've just pubplicated this plugin I made based on ol3
https://github.com/manuelep/geotip
you can find a demo here:
http://manuele.pythonanywhere.com/geotip/test/index

deploing on pythonanywhere where I have a basic account and so no
postgres support I had to isolate a nice feature that permits to load in
the map via ajax even geometries placed in the area defined by the
record selected by the grid, but you can try it locally cloning the
repository. I hope the readme is clear enough.

Cheers

Manuele
Reply all
Reply to author
Forward
0 new messages