' }); var LeafIcon = L.Icon.extend({ options: { iconSize: [28, 28], iconAnchor: [28, 28], popupAnchor: [-14, -28] } }); var imageIcon = new LeafIcon({iconUrl:image}); var marker = new L.Marker(posn,{icon:TextIcon,title:title}).bindPopup(infowindow.content); marker.on('click', function(e) { openPopup(); ga('send', 'event', 'MarkerNZ', 'Petrol Stations in pea ridge', 'detail of petrol station in OpenStreetMap and Leaflet'); }); mgr.addLayer(marker); return marker; } function getDistance(origin, destination) { var lon1=toRadian(origin[1]), lat1=toRadian(origin[0]), lon2=toRadian(destination[1]), lat2=toRadian(destination[0]); var deltaLat=lat2 - lat1; var deltaLon=lon2 - lon1; var a=Math.pow(Math.sin(deltaLat/2), 2) + Math.cos(lat1) * Math.cos(lat2) * Math.pow(Math.sin(deltaLon/2), 2); var c=2 * Math.asin(Math.sqrt(a)); var EARTH_RADIUS=6371; return c * EARTH_RADIUS * 1000; } function toRadian(degree) { return degree*Math.PI/180; } function ObtenerNumTabla() { var tabla=document.getElementById('tablaGasolineras'); var numTabla=tabla.tBodies.length; } function ObtenerFilasTabla() { var tabla=document.getElementById('tablaGasolineras'); numFilasTabla=tabla.tBodies[0].rows.length; } function removeTableRows() { var tabla = document.getElementById('tablaGasolineras'); for (k = 0; k < (numFilasTabla - 1); k++) { if (tabla.rows.length> 0) { tabla.deleteRow(tabla.rows.length - 1); } } } function validar(e) { var tecla = (document.all) ? e.keyCode : e.which; if (tecla === 13) { codeAddress(); } } function link2PageInfo() { var bounds = map.getBounds(); var center = bounds.getCenter(); var myURL = 'https://www.komparing.com/nz/petrol-station/'; myURL += '?lat=' + center.lat + '&lng=' + center.lng + '&zoom=' + map.getZoom(); document.getElementById("enlaceMapa").innerHTML = "" + myURL + "
Enter an address, a city or postcode to find your nearest Gas Station. You have a list of Petrol Stations, including phone number and address. Komparing.com, with OpenStreetMap and Leaflet, search Service Stations in Pea Ridge.