Code: Select all
google.maps.event.addListener(markerPhocaMarker1PlgPM1, 'click', function() {
infoPhocaWindow1PlgPM1.open(mapPhocaMapPlgPM1, markerPhocaMarker1PlgPM1 );
});
google.maps.event.trigger(markerPhocaMarker1PlgPM1, 'click');
The only idea I came up was to basically copy above code with every related variables, and put the into a new function, and this new function basically create the exactly same marker on top of the old one. Just went into the source code and copy the following section and put them into a new function
Code: Select all
var phocaImage7PlgPM1 = new google.maps.MarkerImage(YOUR OWN VALUE);
var phocaPoint1PlgPM1 = new google.maps.LatLng(YOUR OWN VALUE);
var markerPhocaMarker1PlgPM1 = new google.maps.Marker({
title:"YOUR OWN VALUE",
icon:phocaImage7PlgPM1,
position: phocaPoint1PlgPM1,
map: mapPhocaMapPlgPM1
});
var infoPhocaWindow1PlgPM1 = new google.maps.InfoWindow({
content:YOUR OWN VALUE
});
google.maps.event.addListener(markerPhocaMarker1PlgPM1, 'click', function() {
infoPhocaWindow1PlgPM1.open(mapPhocaMapPlgPM1, markerPhocaMarker1PlgPM1 );
});
google.maps.event.trigger(markerPhocaMarker1PlgPM1, 'click');
Is there not a better solution?