Return to Snippet

Revision: 56551
at April 3, 2012 05:03 by cyberhobo

Initial Code
 * Load the MarkerWithLabel library in the Geo Mashup map frame.
global $geo_mashup_custom;
wp_register_script( 'googlev3-marker-with-label', path_join( $geo_mashup_custom->url_path, 'markerwithlabel.js' ), array( 'google-maps-3' ), false, true );
GeoMashupRenderMap::enqueue_script( 'googlev3-marker-with-label' );
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<html xmlns="">
<!--[if lte IE 6]>
<html xmlns:v="urn:schemas-microsoft-com:vml">

		<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
	<title>Geo Mashup Map</title>
		<?php GeoMashupRenderMap::head(); ?>

		<style type="text/css">
			v\:* { behavior:url(#default#VML); }
			#geo-mashup {
				width:<?php echo GeoMashupRenderMap::map_property( 'width' ); ?>;
				height:<?php echo GeoMashupRenderMap::map_property( 'height' ); ?>;
				<?php if ( GeoMashupRenderMap::map_property( 'background_color' ) ) : ?>
				background-color: <?php echo GeoMashupRenderMap::map_property( 'background_color' ); ?>;
				<?php endif; ?>
	<div id="geo-mashup">
			<p><?php _e( 'This map requires JavaScript. You may have to enable it in your settings.', 'GeoMashup' ); ?></p>
	<?php echo GeoMashupRenderMap::map_script( 'geo-mashup' ); ?>

Initial URL

Initial Description
This is very close to the default map frame template that comes with Geo Mashup, but it registers and queues the external library.

Initial Title
Load a javascript library (MarkerWithLabel) in a Geo Mashup map frame template

Initial Tags

Initial Language