2amigos / egmap

Objet-oriented PHP abstraction to the Google Maps API to ease the process of adding a Google Map on your Yii projects.
14 stars 12 forks source link

How to open an EGMapInfoWindow by default / on page load? #4

Closed Niklas-Peter closed 10 years ago

Niklas-Peter commented 10 years ago

How can I realize this, I could just add EGMap0_info_window.open(EGMap0,EGMapMarker2); in the document.ready function, but I want to have a solution, that is built dynamically via PHP, so that I don't have to change anything when variable names changes.

Is there a nice way or more detailed documentation?

outOFFspace commented 10 years ago

Join to the question

tonydspaniard commented 10 years ago

You will have to recall the name of that info window and append the code on its initialization using its afterInit parameters https://github.com/2amigos/egmap/blob/master/EGMap.php#L664

{NAMEOFYOURINFOWINDOW}.open(map, marker)