CodeIgniter Forums
googlemaps infowindow - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forum-22.html)
+--- Thread: googlemaps infowindow (/thread-48553.html)



googlemaps infowindow - El Forum - 01-20-2012

[eluser]Unknown[/eluser]
Hello Steve

I love the Google maps library you provided!

My question is how/what do I add to the JavaScript code to make my ‘infowindow_content’ open on an ‘onmouseover’ instead of clicking the icon?


Here is the code snipet I’m working on.

$marker = array();
$marker['position'] = $coordinate->lat.','.$coordinate->long;

$marker['icon'] = '/househaggler/images/marker_icon.png';

$marker['onmouseover'] =???????????;

$marker['infowindow_content'] = ‘hello world’;


$this->googlemaps->add_marker($marker);





googlemaps infowindow - El Forum - 01-20-2012

[eluser]BIOSTALL[/eluser]
Hey Mikolaj,

Thanks for using my Google Maps API library. Hope you're getting on alright with it Smile

In reference to your question I include the code below to achieve what you're after:

Code:
$marker['onmouseover'] = 'iw.setContent(this.get("content")); iw.open(map, this);';

Hope that helps Smile Give me a shout if you need any further help.

Cheers,

BIOSTALL


googlemaps infowindow - El Forum - 01-21-2012

[eluser]Unknown[/eluser]
Thanks Steve.

Your solution worked perfectly.

I'm not familiar with some of the Javascript syntax that you used.
Could you recommend any links pertaining to the Javascript utilized with your Google maps library. Maybe we could entice you to write about similar Javascript techniques in your excellent blog at biostall.com

Mikolaj
Thunder Bay, Canada


googlemaps infowindow - El Forum - 01-21-2012

[eluser]CroNiX[/eluser]
By using the Google Maps API.