On Jan 19, 5:47 am, antoine <[email protected]> wrote:
> Hello everyone,
>
> I'm working on a project which displays a map of each shop you browse
> in the database.
> you can view an example
> here:http://www.expertshop.be/fr/shop/1230/animal-confort-loncin.htm
> (click on "visualiser sur une carte" under the address.
>
> my problem is quite simple: everything works fine, the map displays
> fine and the marker appears and can be clicked... (I get a __e_ is
> null or not an object tough but it does not affect anything: just so
> you know, this bug is generated by the line "GEvent.trigger(Marker
> [1],"click");")
That is because as far as I can tell you don't have an array Marker.
BTW you have lots of load functions, lots of whitespace at the top of
the page, and probably other problems.
(do a view source on your page in a browser)
>
> My problem is this:
> I wanted the map not to display instantly but to appear after we click
> on the view map link.
> So for this I use the toggle effect of the Scriptaculous framework.
> The thing is the map was visible by default, so i've added a peace of
> JS to hide it on load... the toogle works great, but since then....the
> map does not display right, is not draggable, marker does not show...
> and believe me, if I remove this peace of JS that hide, everything
> goes back to normal...
>
> here is the piece of code:
> function bodyOnload() { $('Gmap').hide(); }
> document.observe("dom:loaded", bodyOnload);
>
The marker is there it is just in the upper left corner of the div.
The problem is that when the map is hidden when it is "created" the
browser returns zero for the size. You need to either:
1. call map.checkResize() after the map is made visible
or
2. use the size option in the map constructor when you create it.
Search the group for "upper left" or "IE table" for lots of examples.
-- Larry
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---