infobubble domready - non-working
old v0.8 code with incorrect 'domready' placement
HTML
<script src="https://maps.googleapis.com/maps/api/js?v=3"></script>
<div id="map_canvas"></div>
CSS
html, body, #map_canvas {
width:100%;
height:100%;
}
JavaScript
var map;
var infoBubble;
// Initial position of the map
var center = new google.maps.LatLng(-25.363882, 131.044922);
function initialize() {
// Map options
var mapOptions = {
zoom: 4,
center: center,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
// Attach the map to the document
map = new google.maps.Map(document.getElementById('map_canvas'),
mapOptions);
// The marker
marker = new google.maps.Marker({
position: new google.maps.LatLng(-25.363882, 131.044922),
map: map,
title: 'marker7'
});
infoBubble = new InfoBubble({
maxWidth: 450,
minWidth: 450,
maxHeight: 165,
minHeight: 165,
backgroundColor: 'rgba(65,65,65,0.7)',
disableAnimation: true,
content: '<div><a class="dialog" href="https://maps.google.com/" target="_blank"></a></div>',
position: new google.maps.LatLng(-34.397, 150.644)
});
google.maps.event.addListener(marker, 'click', function () {
console.log('marker just clicked');
infoBubble.open(map, marker);
console.log('line after infoBubble.open');
google.maps.event.addListener(infoBubble, 'domready', function () {
});
});
}
google.maps.event.addDomListener(window, 'load', initialize);
//================= old infobubble.js code ==================== //
// ==ClosureCompiler==
// @compilation_level ADVANCED_OPTIMIZATIONS
// @externs_url http://closure-compiler.googlecode.com/svn/trunk/contrib/externs/maps/google_maps_api_v3.js
// ==/ClosureCompiler==
/**
* @name CSS3 InfoBubble with tabs for Google Maps API V3
* @version 0.8
* @author Luke Mahe
* @fileoverview
* This library is a CSS Infobubble with tabs. It uses css3 rounded corners and
* drop shadows and animations. It also allows tabs
*/
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You...