Jump to content

[Resolvido] Mapa do Google não funciona no wordpress


Recommended Posts

Boas Pessoal,

Estou a tentar seguir estes tutoriais https://developers.google.com/maps/documentation/javascript/overlays?hl=pt-br#SimpleIcons

para construir mapas, só que estou a tentar coloca-los no wordpress. O meu problema é que numa página html simples, fora do wordpress tudo funciona, agora dentro de uma página wordpress não aparece nada.

O meu código é o seguinte:

 Template Name: ondeEstamos
html, body, #map-canvas {
	margin: 0;
	padding: 0;
	height: 100%;
	<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
		var map;
		function initialize() {
			var mapOptions = {
				zoom: 8,
				center: new google.maps.LatLng(-34.397, 150.644),
				mapTypeId: google.maps.MapTypeId.ROADMAP
			map = new google.maps.Map(document.getElementById('map-canvas'),
		google.maps.event.addDomListener(window, 'load', initialize);

		window.onload = initialize();

	<div id="primary">
			<div id="map-canvas"></div>
<?php get_footer(); ?>

Alguém sabe porque? Obrigado 🙂

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.