I have been looking over this code for the past hour, I cant see why html pop up will not show, I'm probably missing something simple as no errors are reported.
var map;
var markers = new Array();
var geocoder;
function initialize() {
if (GBrowserIsCompatible()) {
map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(<?php echo $map_center; ?>), 17);
map.addControl(new GLargeMapControl());
map.addControl(new GMapTypeControl());
geocoder = new GClientGeocoder();
}
}
function createMarker(point,number) {
var marker = new GMarker(point);
marker.value = number;
GEvent.addListener(marker, "click", function() {
map.openInfoWindowHtml(point, createInfoText());
});
return marker;
}
function createInfoText() {
var html = '<p>hello world</p>';
return html;
}
$(document).ready(function () {
initialize();
var point = new GLatLng("51.2357, -0.5726");
map.addOverlay(createMarker(point,1));
});
Thanks in advance all