Closed bigode88 closed 4 years ago
Anything's possible, but the purpose of the infowindow was to provide information on a particular point of interest to the user if they click on one of the points.
Generally when I want information to be always visible, I place it separately on the page in Apex.
Yes it is that my project is a monitoring system on the map and I want the summary information to remain in the infowindow always all open default.
It would help me in this case, because I had difficulty in the plugin to do this.
example: http://www.greenbyte.com/fileadmin/template/images/bright/bright-screenshot-monitor-map.jpg
Only the open infowindow as default.
Thanks!
I got it!
google.maps.event.addListener(reppin, "click", function () {
apex.debug(opt.regionId+" repPin clicked "+pData.id);
if (pData.info) {
if (opt.iw) {
opt.iw.close();
} else {
opt.iw = new google.maps.InfoWindow();
}
opt.iw.setOptions({
content: pData.info
});
opt.iw.open(opt.map, this);
}
});
google.maps.event.addListener(opt.map, "tilesloaded", function () {
opt.iw = new google.maps.InfoWindow();
opt.iw.setOptions({
content: pData.info
});
opt.iw.open(opt.map, reppin);
});
I'm glad you found a way :)
Note that tilesloaded fires whenever the map loads a tile - so it may re-fire when the user pans or zooms.
You might consider using google.maps.event.addListenerOnce instead of addListener.
Great idea! :) Thanks for support!!
This will become possible in the next release by using a new attribute, Marker Callback Javascript. This will be called for each marker when it is placed on the map; your code can then show the info window if it needs to.
An alternative to this might be to make the markers themselves more customisable - e.g. a square box with multiple lines of text instead of a single teardrop marker.
In v1.1 it will be possible to add a dynamic action on the markerAdded event which runs the following javascript to show the info window:
$("#map_mymap").reportmap("showInfoWindow", this.data.marker);
This will only be useful if the report only has one marker, however; as the map currently only generates a single InfoWindow object at a time.
Added in Release 1.1
Is there any way to leave all infowindow open by default?