Alex,

To remove the auto opening of info window, you remove the line
map.openInfoWindow (or comment out).

You currently have the event handler for mouse click on marker to open
info window but the parameter 'info' you are passing is not set.  See
this example here for how to do it:
http://code.google.com/apis/maps/documentation/examples/icon-custom.html.

If you want to have the same effect for mouse over, you just need to
define a mouseover event handler like that for click.

-ss

On Oct 28, 9:30 am, Kwajongen <[email protected]> wrote:
> Hi,
>
> I am developing my website but I am not able to achieve the points
> below, consider that I am not a programmer:
>
> 1) Presently the infowindow opens by default when the map shows up,
> I'd rather prefer the window not to popup at opening.
> 2) Once I move my mouse over the balloon, I'd like to see the
> infowindow,
> 3) Same as point 2) but with mouse click
> 4) When he infowindow is open, the user should be able to close it by
> clicking the baloon or any area of the map
>
> I use the enclosed code, tried to achieve what above, but without
> success :(
>
> Thank you for your help.
>
> Alex
>
> <?php
>   drupal_set_html_head('<script rel="lightbox" src="http://
> maps.google.com/maps?
> file=api&amp;v=2&amp;key=ABQIAAAAd90RR0OjTeOuDb-9TIyekxT7B7WaQDccmhMwOQeUBolQL9GphxSZ-
> fHp2-0j8KmG8sRbqY0Ub19J5w"
>       type="text/javascript"></script>
>     <script type="text/javascript">
>
>     //<![CDATA[
>
>     function load() {
>       if (GBrowserIsCompatible()) {
>         var map = new GMap2(document.getElementById("map"));
>         map.addControl(new GLargeMapControl());
>         map.addControl(new GMapTypeControl());
>         map.addControl(new GOverviewMapControl());
>         map.enableContinuousZoom();
>         map.enableDoubleClickZoom();
>         map.setCenter(new GLatLng(41.90432124806034,
> 12.454376220703125), 9);
>         map.openInfoWindow(map.getCenter(), "<B>MyCompany</
> B><hr>Address, <BR>ZIP, City, Country<hr><B>Phone:</B> 0123456789");
>          var point = new GLatLng(41.90432124806034,
> 12.454376220703125);
>          var marker = new GMarker(point);
>          GEvent.addListener(marker, "click", function() {
>           marker.openInfoWindowHtml(info);
>          });
>          map.addOverlay(marker);
>          marker.openInfoWindowHtml(info);
>
>       }
>     }
>
>     //]]>
>     </script>
>     <script type="text/javascript">
>     window.onload = function() {
>       load();
>     }
>     window.onunload = function() {
>       GUload();
>     }
>   </script>');
> ?>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to