Sha256: be2aecd1cdad51efcbfdb2d426e069190dc8b02f63b07d12f75161917d537aa8

Contents?: true

Size: 1.85 KB

Versions: 47

Compression:

Stored size: 1.85 KB

Contents

//google map
if ($("#map-canvas").length) {
jQuery(document).ready(function($) {
	
	"use strict";

		var map;
		function initialize() {
		  var mapOptions = {
		    zoom: 12,
		    center: new google.maps.LatLng(37.048437, -100.921268)
		  };
		  map = new google.maps.Map(document.getElementById('map-canvas'),
		      mapOptions);
		      var marker = new google.maps.Marker({
		        map: map,
		        icon: "images/map-marker.png",
		        title: "Mi marcador",
		        position: map.getCenter()
		      });
		      var marker2 = new google.maps.Marker({
		        map: map,
		        icon: "images/map-marker2.png",
		        title: "Otro marker",
		        position: new google.maps.LatLng(37.071450, -100.900326)
		      });
		      var marker3 = new google.maps.Marker({
		        map: map,
		        icon: "images/map-marker3.png",
		        title: "Otro marker mas",
		        position: new google.maps.LatLng(37.020208, -100.917492)
		      });



		      var infowindow = new google.maps.InfoWindow();
		      infowindow.setContent('<b>Mi marcador</b><br>Tel: 46546545');

		      var infowindow2 = new google.maps.InfoWindow();
		      infowindow2.setContent('<b>Otro marker</b><br>Tel: 46546545');

		      var infowindow3 = new google.maps.InfoWindow();
		      infowindow3.setContent('<b>Otro marker mas</b><br>Tel: 46546545');

		      infowindow.open(map, marker);


		      google.maps.event.addListener(marker, 'click', function() {
		        infowindow.open(map, marker);
		      });
		      google.maps.event.addListener(marker2, 'click', function() {
		        infowindow2.open(map, marker2);
		      });
		      google.maps.event.addListener(marker3, 'click', function() {
		        infowindow3.open(map, marker3);
		      });
		}

		google.maps.event.addDomListener(window, 'load', initialize);
});
}

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
phcthemes_web_theme_pack-4.1.0 app/assets/javascripts/themes/pitnik/theme/map-init.js
phcthemes_web_theme_pack-4.0.6 app/assets/javascripts/themes/pitnik/theme/map-init.js
phcthemes_web_theme_pack-4.0.5 app/assets/javascripts/themes/pitnik/theme/map-init.js
phcthemes_web_theme_pack-4.0.4 app/assets/javascripts/themes/pitnik/theme/map-init.js
phcthemes_web_theme_pack-4.0.3 app/assets/javascripts/themes/pitnik/theme/map-init.js
phcthemes_web_theme_pack-4.0.2 app/assets/javascripts/themes/pitnik/theme/map-init.js
phcthemes_web_theme_pack-4.0.1 app/assets/javascripts/themes/pitnik/theme/map-init.js
phcthemes_web_theme_pack-4.0.0 app/assets/javascripts/themes/pitnik/theme/map-init.js
phcthemes_web_theme_pack-3.2.0 app/assets/javascripts/themes/pitnik/theme/map-init.js
phcthemes_web_theme_pack-3.0.2 app/assets/javascripts/themes/pitnik/theme/map-init.js
phcthemes_web_theme_pack-3.1.0 app/assets/javascripts/themes/pitnik/theme/map-init.js
phcthemes_web_theme_pack-3.0.1 app/assets/javascripts/themes/pitnik/theme/map-init.js
phcthemes_web_theme_pack-3.0.0 app/assets/javascripts/themes/pitnik/theme/map-init.js
phcthemes_web_theme_pack-2.0.12 app/assets/javascripts/themes/pitnik/theme/map-init.js
phcthemes_web_theme_pack-2.0.11 app/assets/javascripts/themes/pitnik/theme/map-init.js
phcthemes_web_theme_pack-2.0.10 app/assets/javascripts/themes/pitnik/theme/map-init.js
phcthemes_web_theme_pack-2.0.9 app/assets/javascripts/themes/pitnik/theme/map-init.js
phcthemes_web_theme_pack-2.0.8 app/assets/javascripts/themes/pitnik/theme/map-init.js
phcthemes_web_theme_pack-2.0.7 app/assets/javascripts/themes/pitnik/theme/map-init.js
phcthemes_web_theme_pack-2.0.6 app/assets/javascripts/themes/pitnik/theme/map-init.js