Google Maps API on geodjango admin

1,053 views
Skip to first unread message

Maurício de Paulo

unread,
May 8, 2010, 5:07:42 PM5/8/10
to geod...@googlegroups.com
Well, I've really loved GeoDjango and it's usability and maybe now I can retribute with some applications.
I've altered openlayers.js and openlayers.html to make the vectorization admin use google maps layers.
I'm sending attached the gmap.js and gmap.html that I altered. These files should be in templates folder of an app to work.
The rest is just configuration in the model, as described in the example models.
This way a person will be able to use google's 4 layers and a few more openlayers tools (zoom to area and zoom level).
Maurício de Paulo

--
You received this message because you are subscribed to the Google Groups "geodjango" group.
To post to this group, send email to geod...@googlegroups.com.
To unsubscribe from this group, send email to geodjango+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/geodjango?hl=en.
postgis_GoogleMerc.sql
templates.rar

Tyler Lane

unread,
May 8, 2010, 5:25:57 PM5/8/10
to geod...@googlegroups.com
if i remember correctly it is against the google maps TOS to use the tiles or api on a password projected site. I'm sure someone will be able to correct me on the exact details of it though.

Tyler Lane
ty...@nolongervalid.com


2010/5/8 Maurício de Paulo <mauric...@gmail.com>

Robert Coup

unread,
May 9, 2010, 8:17:58 AM5/9/10
to geod...@googlegroups.com
On Sun, May 9, 2010 at 9:25 AM, Tyler Lane <ty...@nolongervalid.com> wrote:
> if i remember correctly it is against the google maps TOS to use the tiles
> or api on a password projected site. I'm sure someone will be able to
> correct me on the exact details of it though.

Generally, yes. Your GMaps API-using application must be "generally
accessible to users without charge" and not be behind a firewall,
unless you're using GMaps Premier (which has the same API, just a
different key & endpoint).

It's been discussed previously on the GMaps group, that Google sees it
as acceptable to use GMaps in a private admin interface for a public
site that also uses GMaps.

Rob :)

Maurício de Paulo

unread,
May 9, 2010, 9:45:35 AM5/9/10
to geod...@googlegroups.com
Anyway, the template is also used for public sites in django. As far as I know, at the moment the only way to insert a widget for inputing geodata is to use the admin widget. Am I right?
If that's the case, the only possibility is to use a admin template to access gmaps or don't access at all.
Mauricio
--
1º Ten Mauricio
Chefe da Seção de Processamento de Imagens
1ª Divisão de Levantamento
Exército Brasileiro - Braço Forte, Mão Amiga.

Charlie DeTar

unread,
May 12, 2010, 4:03:46 PM5/12/10
to geod...@googlegroups.com
On 05/09/2010 09:45 AM, Maurício de Paulo wrote:
> Anyway, the template is also used for public sites in django. As far
> as I know, at the moment the only way to insert a widget for inputing
> geodata is to use the admin widget. Am I right?
> If that's the case, the only possibility is to use a admin template to
> access gmaps or don't access at all.
> Mauricio

Hi Mauricio,

I've written a portable application, "olwidget", which implements
editable openlayers maps in forms inside and outside of admin. It has
support for google, microsoft, yahoo and cloudmade base layers.

I'm particularly excited to announce the development version which also
has support for many new features, including editing or displaying
multiple named vector layers on a single map, the ability to delete as
well as modify vertices, and undo/redo support for edits. I'm
developing these new features in the branch "multi" on github:

http://github.com/yourcelf/olwidget/tree/multi

It can be cloned thusly:

git clone git://github.com/yourcelf/olwidget.git --branch=multi

I would be very grateful for any feedback, testing and bugs.
Documentation and examples can be found here:

http://olwidget.org

Ultimately, I would like to merge this work with Django trunk, but with
all the instability of new feature development, now doesn't seem the
time. But I would welcome any suggestions on how to best go that route.

best,
Charlie

Andriy

unread,
Jun 30, 2012, 5:23:30 PM6/30/12
to geod...@googlegroups.com
Hi thank you very much for the help, but I have a problem when trying to integrate the following code. I have the following error, could anyone hlep???


Reply all
Reply to author
Forward
0 new messages