General Interface is an open source project hosted by the Dojo Foundation

Show a GMaps in a jsx3.gui.Block

Show a GMaps inside a block.
Contributed by Tony Lefebvre

showGMaps
/**
 * Show a GMaps inside a block\n
 * GMaps API V3 must be loaded first !\n
 * Usage:\n
 * <code>
 * showGMaps(myApp.APP, 'blkMyBlock')
 * </code>
 * 
 * @param objServer (jsx3.app.Server) server namespace object
 * @param strBlockName (String) target block name
 * @return {null} 
 * 	
 */
showGMaps = function(objServer, strBlockName) {
	var latlng = new google.maps.LatLng(48.8566667, 2.3509871);
	var myOptions = {
		zoom : 8,
		center : latlng,
		mapTypeId : google.maps.MapTypeId.ROADMAP
	};
	var blkTarget = objServer.getJSXByName(strBlockName)
	new google.maps.Map(blkTarget.getRendered(), myOptions);
)
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.