Re: [Google Maps API v2] Would like to see the infoWindow on start
The same way that code creates an infowindow and stores in a variable
and then opens it (when the listener fires)
In the code that creates the map (possibly an initialize() function,
create the infowindow, and call the open() method.
On Wed, Jan 23, 2013 at 2:15 PM, sophios <jeroen.poots@gmail.com> wrote:
> Hello,
>
> I've read a lot in this group about showing the infoWindow in Google Maps.
> But I don't find the right answer.
> For my website I have a code that when I go over the marker, the infoWindow
> Pops-up. And when I click, I manually close the infoWindow.
> But when I start the page, I only see the map and the marker. I also would
> like to see at on load the infoWindow.
>
> Can you help me to fix the script? So when I start the page, I see the map,
> the marker and the infoWindow.
>
> This is the code:
> $create_infowindow = '
> function attachinfowindow(marker, place, i){
> '.$MoreInfoTexte.'
> infowindow'.$num.'[i] = new google.maps.InfoWindow({
> content: place[4],
> maxWidth : '.(int)$config->get('gmapfp_width_bulle_GMapFP', 400).',
> disableAutoPan : '.$config->get('gmapfp_AutoPan', 0).'
> });
> google.maps.event.addListener(marker, \'mouseover\', function(e) {
> infowindow'.$num.'[i].setZIndex(++infowindowLevel);
> infowindow'.$num.'[i].open(carteGMapFP'.$num.',marker);
> });
> google.maps.event.addListener(marker, \'mouseout\', function(e) {
> infowindow'.$num.'[i].setZIndex(++infowindowLevel);
> infowindow'.$num.'[i].close(carteGMapFP'.$num.',marker);
> });
> }';
>
> Thanks in Advance,
>
> Jeroen
>
> --
>
>
--
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home