MMCT TEAM
Server IP : 111.118.215.189  /  Your IP : 3.144.253.150
Web Server : Apache
System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : a1673wkz ( 2475)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home1/a1673wkz/propstonerealty.com/js/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home1/a1673wkz/propstonerealty.com/js/map4.js
$(document).ready(function () {
	'use strict';

	if ($('#map-leaflet').length) {
		var map = L.map('map-leaflet', {
			zoom: 9,
			maxZoom: 20,
			tap: false,
			gestureHandling: true,
			center: [40.90, -73.90]
		});

		var marker_cluster = L.markerClusterGroup();

		map.scrollWheelZoom.disable();

		var OpenStreetMap_DE = L.tileLayer('https://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png', {
			scrollWheelZoom: false,
			attribution: '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
		}).addTo(map);

		$.ajax('js/markers.json', {
			success: function (markers) {
				$.each(markers, function (index, value) {
					var icon = L.divIcon({
						html: value.icon,
						iconSize: [50, 50],
						iconAnchor: [50, 50],
						popupAnchor: [-20, -42]
					});

					var marker = L.marker(value.center, {
						icon: icon
					}).addTo(map);

					marker.bindPopup(
						'<div class="listing-window-image-wrapper">' +
						'<a href="' + value.link + '">' +
						'<div class="listing-window-image" style="background-image: url(' + value.image + ');"></div>' +
						'<div class="listing-window-content">' +
						'<div class="info">' +
						'<h2>' + value.title + '</h2>' +
						'<p>' + value.desc + '</p>' +
						'<h3>' + value.price + '</h3>' +
						'</div>' +
						'</div>' +
						'</a>' +
						'</div>'
					);

					marker_cluster.addLayer(marker);
				});

				map.addLayer(marker_cluster);
			}
		});
	}

});

MMCT - 2023