Phil,
I don't maintain the plugin, but here's what I did to test to see if it
would still work. I made copies of all my files (backup). I read the Google
developer page that says that now only businesses have to pay for a key.
So if you are learning how to use the api you don't have to pay anything
now, it is free.
I removed the instances or mentions of GOOGLE_KEY in the model file that
came with the web2py plugin, and also in the plugin's index file.
In my view I added the reference to google's path for the v3 api like this:
{{response.files.append(URL('https://maps.googleapis.com/maps/api/js?sensor=false'))}}
{{extend 'layout.html'}}
{{=LOAD('plugin_gmap')}}
then I saved the file. It loaded with no problems.
Also, I think the newest version of web2py has more GIS type features built
in with examples, but I haven't got the chance
yet to try them out. There might be more discussion about this on the list.
Good luck!
Margaret
On Monday, September 17, 2012 2:10:48 AM UTC-5, Philip Kilner wrote:
>
> Hi,
>
> I'd like to embed a map in a view, and am trying to use plugin_wiki.
>
> I have plugin_wiki installed, and when I use a simpler function, like the
> YouTube example: -
>
> {{=plugin_wiki.widget('youtube',code='l7AWnfFRc7g')}}
>
>
> ...all is well.
>
> However, if I try to embed a map, I get a ticket with: -
>
> Traceback (most recent call last):
> File "/home/philk/web2py/gluon/restricted.py", line 209, in restricted
> exec ccode in environment
> File "/home/philk/web2py/applications/myapp/views/property/index.html",
> line 151, in <module>
> AttributeError: 'PluginWiki' object has no attribute 'map'
>
> Can anyone clue me in as to what I'm missing?
>
> N.B. I'm new to plugins (most of my apps a re simple CRUD), so I may well
> have overlooked something fundamental.
>
> Also, when I get it working I'm a bit confused about the need for an API
> key - the book says "key is the google map api key (default works for
> 127.0.0.1)", but first of all I don't see a default key, and secondly I see
> from the docs at: -
>
> https://developers.google.com/maps/signup
>
> ...that the version that needed an API key is deprecated, so I'm concerned
> that the map plugin itself may be updated.
>
> What would really help me out would be a downloadable app that contained a
> worked example, if there is such a thing.
>
> ---
>
> Cheers,
>
> PhilK
>
>
>
>
>
>
>
>
>
--