Maps: ajax search javascript fails to load in base_edit for class extended from Maps

2 Messages Forum Options Options
Embed this topic
Permalink
Kees Hink
Maps: ajax search javascript fails to load in base_edit for class extended from Maps
Reply Threaded MoreMore options
Print post
Permalink
MyClass extends the Maps (1.1rc1) product's Location class.
(A "generalization" in ArgoUML.) This way i can show the
MyClass objects in a folder on a map. (Great product, Maps.)

Unfortunately, the location search function on the MyClass
edit form has disappeared. When creating a new MyClass
object, you used to be able to search for an address+city,
and the resulting location is shown on a map. I believe this
bit is called the ajaxsearch. Recently, when you add a new
object of type MyClass, the search input text field is gone,
as is the map. You can still enter a location, but you have
to do it in coordinates, which is much less user-friendly.

I'm testing this at localhost:8080, so the default API keys
should work. The Location class still works in the same
Plone instance (when i add a Location, i do get the search
option), so i assume it's not an API key problem. I did
register another API key though, just making sure, which
didn't make a difference.

I compared the edit form for Location to MyClass, and
MyClass appears to lack a div of class "googleMapPane". The
decision whether or not to put this in the page or not is
apparently made in maps-googlemaps.js.

It seems that this javascript is not loaded from the MyClass
edit form. The Location edit form does have a line <script
src="http://localhost:8080/Plone/portal_javascripts/Plone%20Default/maps-googlemaps.js"
type="text/javascript">, the MyClass form doesn't. I'm not
using a customised form for editing, though, just ATCT's
base_edit.

Any hints or questions to determine the problem more
specifically are greatly appreciated!

Kees

MyClass code: http://paste.plone.org/23187

Maps 1.1rc1

Plone 2.5.5,
CMF-1.6.4,
Zope (Zope 2.9.8-final, python 2.4.4, linux2),
Five 1.3.10,
Python 2.4.4 (#2, Jul 28 2008, 14:14:19) [GCC 4.2.3 (Ubuntu
4.2.3-2ubuntu7)],
PIL 1.1.6

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users
Kees Hink
Re: Maps: ajax search javascript fails to load in base_edit for class extended from Maps
Reply Threaded MoreMore options
Print post
Permalink
Solved: The javascript tool showed a condition of
"object/@@maps_googlemaps_view/enabled | nothing" for the
maps javascripts. The class MyClass did not have the
maps_googlemaps_view registered. I made a modification in
the configure.zcml which registered the view for MyClass,
and that fixed it.

(Why this product once worked, and what made it stop
working, is still a question, but a less pressing one.)

Kees

Kees Hink wrote:

> MyClass extends the Maps (1.1rc1) product's Location class.
> (A "generalization" in ArgoUML.) This way i can show the
> MyClass objects in a folder on a map. (Great product, Maps.)
>
> Unfortunately, the location search function on the MyClass
> edit form has disappeared. When creating a new MyClass
> object, you used to be able to search for an address+city,
> and the resulting location is shown on a map. I believe this
> bit is called the ajaxsearch. Recently, when you add a new
> object of type MyClass, the search input text field is gone,
> as is the map. You can still enter a location, but you have
> to do it in coordinates, which is much less user-friendly.
>
> I'm testing this at localhost:8080, so the default API keys
> should work. The Location class still works in the same
> Plone instance (when i add a Location, i do get the search
> option), so i assume it's not an API key problem. I did
> register another API key though, just making sure, which
> didn't make a difference.
>
> I compared the edit form for Location to MyClass, and
> MyClass appears to lack a div of class "googleMapPane". The
> decision whether or not to put this in the page or not is
> apparently made in maps-googlemaps.js.
>
> It seems that this javascript is not loaded from the MyClass
> edit form. The Location edit form does have a line <script
> src="http://localhost:8080/Plone/portal_javascripts/Plone%20Default/maps-googlemaps.js"
> type="text/javascript">, the MyClass form doesn't. I'm not
> using a customised form for editing, though, just ATCT's
> base_edit.
>
> Any hints or questions to determine the problem more
> specifically are greatly appreciated!
>
> Kees
>
> MyClass code: http://paste.plone.org/23187
>
> Maps 1.1rc1
>
> Plone 2.5.5,
> CMF-1.6.4,
> Zope (Zope 2.9.8-final, python 2.4.4, linux2),
> Five 1.3.10,
> Python 2.4.4 (#2, Jul 28 2008, 14:14:19) [GCC 4.2.3 (Ubuntu
> 4.2.3-2ubuntu7)],
> PIL 1.1.6
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users