I can't seem to get the gmaps plugin to work.
I have this in the model:
from gluon.storage import Storage
plugin_gmap=Storage()
plugin_gmap.set=db(db.t_kiinnostuneet).select()
points=db(db.t_kiinnostuneet.id>0).select()
plugin_gmap.represent=lambda row: '%(db.t_kiinnostuneet.f_lat)s
%(db.t_kiinnostuneet.f_long)s' % row
This is my controller:
def index():
width = request.vars.width or 400
height = request.vars.height or 300
rows = db(db.t_kiinnostuneet.id>0).select()
for row in rows:
row.plugin_gmap_popup = 'foo' #plugin_gmap.represent(row)
return
dict(width=width,height=height,rows=rows,GOOGLEMAP_KEY=plugin_gmap.key)
The page is https://www2.olka.fi/kiinnostuneet/default/kartta where you
can also see from the source what my view is like.
This might be an issue with the API key, but I have re-generated it and
even created a new project in Google apis just for this. As far as I
understand, all I have to do is to go the project's API Access page and
copy the key under the "Simple API Access" section.
This plugin really should be updated to v3. I tried to use v3 (based on
Margaret's tips) but couldn't get that to work either.
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.