plugin google map

250 views
Skip to first unread message

Massimo Di Pierro

unread,
Jan 2, 2010, 4:41:26 PM1/2/10
to web...@googlegroups.com
Here is a gmap plugin.
- install
- edit models/plugin_gmap.py to set the query for the points to be
shown on map (read example)
- add component to pages {{=LOAD('plugin_gmap')}}

web2py.plugin.gmap.w2p

Ntu2ko

unread,
Feb 6, 2012, 5:22:03 AM2/6/12
to web...@googlegroups.com
Hi mdipierro,

I am fairly a newbie to python and sql, I have a task to render a google map as my home page (thereby replacing the default welcome page), and then populating the map with placemarks read from  a table I have created in the database. The table already has latitude and longitude as columns. How can I 1) change the default page to my google map? and 2) use the query to extract the latitudes and longitudes values and create the placemarks?

Your help will be greatky appreciated. 

Gael Princivalle

unread,
Oct 1, 2013, 10:57:38 AM10/1/13
to web...@googlegroups.com
Hi Massimo.

Sorry but I've don't understand how I can use this plug-in.
>plugin_gmap.set=db(db.auth_user.id>0) ### change this to a query that lists records with latitude and longitute
Do I have to create another table with one field, and make two records, one with latitude and another with longitude ? In this case error is:
'Row' object has no attribute 'auth_user'

>plugin_gmap.represent=lambda row: '%(first_name)s %(last_name)s' % row['auth_user']
User must be logged for being able to see the map ?

Thanks.

Massimo Di Pierro

unread,
Oct 1, 2013, 4:30:14 PM10/1/13
to web...@googlegroups.com
I believe the google map API have changed. That plugin is obsolete. I think we need a new one.
Anyway look into 

applications/welcome/views/generic.map


Anyway 
Reply all
Reply to author
Forward
0 new messages