I managed to get things working (sort off), not in an ideal matter but it shall do until someone can point me a better way.
Basically I simply bypassed the ajax calling of the document and instead used the infowindow to display the contents of my mkrContent tv.
Bellow code:
function initialize(){
var centerMap = new google.maps.LatLng(' . $this->config['lat'] . ',' . $this->config['lng'] . ');
var optionsMap = {
zoom: ' . $this->config['zoom'] . ',
center: centerMap,
mapTypeId: google.maps.MapTypeId.' . $this->config['mapType'] . '
}
var map = new google.maps.Map(document.getElementById("'. $this->config['mapId'] .'"), optionsMap);
setMarkers(map);
on gmaps.class.php file
I added this:
var markerPlace = new google.maps.Marker(marker);
var contentString = "'. $this->config['contentString'] .'";
var infowindow = new google.maps.InfoWindow({
content: contentString,
position: centerMap
});
google.maps.event.addListener(markerPlace, "click", function() {
infowindow.open(map,markerPlace);
});
infowindow.open(map,markerPlace);
And in my snippet call, I added this:
&contentString=`[[*mkrContent:strip]]`
This works for displaying the infobox on the document, I am only using one gmaps. This probably wont work if you are doing it with multiple documents or maps at the same time as it is only using the tv from the current document.
I still welcome directions, I would like to continue using this snippet once it updates if it is able to be used in the matter I need.