{"id":1453,"date":"2025-11-04T10:57:32","date_gmt":"2025-11-04T08:57:32","guid":{"rendered":"https:\/\/www.bahalohosting.com\/wchaniataxi2025\/chartis\/"},"modified":"2025-12-16T13:39:34","modified_gmt":"2025-12-16T11:39:34","slug":"map","status":"publish","type":"page","link":"https:\/\/www.chaniataxi.gr\/en\/map\/","title":{"rendered":"Map"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"1453\" class=\"elementor elementor-1453 elementor-508\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-318655d e-con-full e-flex e-con e-parent\" data-id=\"318655d\" data-element_type=\"container\">\n\t\t<div class=\"elementor-element elementor-element-1018e99 e-flex e-con-boxed e-con e-child\" data-id=\"1018e99\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-8a2b115 elementor-widget__width-initial elementor-widget elementor-widget-heading\" data-id=\"8a2b115\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t\t<h1 class=\"elementor-heading-title elementor-size-default\">Map<\/h1>\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-e64190f e-con-full e-flex e-con e-child\" data-id=\"e64190f\" data-element_type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-b6b5c70 elementor-hidden-desktop elementor-hidden-laptop elementor-hidden-tablet_extra elementor-hidden-tablet elementor-hidden-mobile_extra elementor-hidden-mobile elementor-widget elementor-widget-html\" data-id=\"b6b5c70\" data-element_type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t\t<a href=\"#!\" onclick=\"fromYourLocation()\">From your location<\/a>\r\n<a href=\"#!\" onclick=\"initMap(35.540328192421704, 24.13043975830078,'35.513652, 23.944857')\">From Chania Airport<\/a>\r\n<a href=\"#!\" onclick=\"initMap(35.48936300690188, 24.076838493347168,'35.513652, 23.944857')\">From Souda Port<\/a>\r\n<a href=\"#!\" onclick=\"initMap(35.33601110658638, 25.17414110577397,'35.513652, 23.944857')\">From Heraklion Airport<\/a>\r\n<a href=\"#!\" onclick=\"initMap(35.343507, 25.150937,'35.513652, 23.944857')\">From Heraklion Port<\/a>\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4c4976f elementor-widget__width-initial elementor-widget-laptop__width-initial elementor-widget-tablet_extra__width-inherit elementor-widget elementor-widget-text-editor\" data-id=\"4c4976f\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>Drag point &#8220;B&#8221; (marker) to any point you want on the map.<br \/><br \/>This will give you the distance, directions and destination (at the bottom of the directions).<br \/>Have a good trip.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-879e3c7 elementor-widget__width-inherit ct-map elementor-widget elementor-widget-html\" data-id=\"879e3c7\" data-element_type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t\t<div id=\"map\" style=\"width: 100%; height: 550px; float: left;\"><\/div> \r\n<div id=\"panel\" style=\"width: 100%; float: right;\"><\/div> \r\n\r\n <script src=\"https:\/\/maps.google.com\/maps\/api\/js?key=AIzaSyBou7RKC7Z5QZ63HIS4khfSf0Xkffxix4s&language=en\"><\/script>\r\n<script type=\"text\/javascript\"> \r\n  var directionsService = new google.maps.DirectionsService();\r\n    var destinationCords = '35.513652, 23.944857';\r\n  \r\n  function fromYourLocation() {\r\n    if (location.protocol == 'https:'){\r\n      if (navigator.geolocation) {\r\n        navigator.geolocation.getCurrentPosition(function (position) {                                                              \r\n          initMap(position.coords.latitude,position.coords.longitude,destinationCords)\r\n        });\r\n      }\r\n    }\r\n  }\r\n\r\n  initMap();\r\n  \r\n  function initMap(lat,long,destinationCordss){\r\n    if (lat && long && destinationCordss) {\r\n      originx = lat+','+long;\r\n      destinx = destinationCordss;\r\n    } else{\r\n      originx = '35.51379308593382,24.020161009539834';\r\n      destinx = destinationCords;\r\n    }\r\n    document.getElementById('panel').innerHTML = \"\"\r\n    var directionsDisplay = new google.maps.DirectionsRenderer({\r\n      draggable: true,\r\n      map: map,\r\n      panel: document.getElementById('panel')\r\n    });\r\n    var map = new google.maps.Map(document.getElementById('map'), {\r\n      zoom:7,\r\n      scrollwheel: false,\r\n      draggable: true,\r\n      mapTypeId: google.maps.MapTypeId.ROADMAP,\r\n      styles: [\r\n    \r\n    {\r\n        \"featureType\": \"all\",\r\n        \"elementType\": \"labels.text.fill\",\r\n        \"stylers\": [\r\n            {\r\n                \"saturation\": 36\r\n            },\r\n            {\r\n                \"color\": \"#333333\"\r\n            },\r\n            {\r\n                \"lightness\": 40\r\n            }\r\n        ]\r\n    },\r\n    {\r\n        \"featureType\": \"all\",\r\n        \"elementType\": \"labels.text.stroke\",\r\n        \"stylers\": [\r\n            {\r\n                \"visibility\": \"on\"\r\n            },\r\n            {\r\n                \"color\": \"#ffffff\"\r\n            },\r\n            {\r\n                \"lightness\": 16\r\n            }\r\n        ]\r\n    },\r\n    {\r\n        \"featureType\": \"all\",\r\n        \"elementType\": \"labels.icon\",\r\n        \"stylers\": [\r\n            {\r\n                \"visibility\": \"off\"\r\n            }\r\n        ]\r\n    },\r\n    {\r\n        \"featureType\": \"administrative\",\r\n        \"elementType\": \"geometry.fill\",\r\n        \"stylers\": [\r\n            {\r\n                \"color\": \"#fefefe\"\r\n            },\r\n            {\r\n                \"lightness\": 20\r\n            }\r\n        ]\r\n    },\r\n    {\r\n        \"featureType\": \"administrative\",\r\n        \"elementType\": \"geometry.stroke\",\r\n        \"stylers\": [\r\n            {\r\n                \"color\": \"#fefefe\"\r\n            },\r\n            {\r\n                \"lightness\": 17\r\n            },\r\n            {\r\n                \"weight\": 1.2\r\n            }\r\n        ]\r\n    },\r\n    {\r\n        \"featureType\": \"landscape\",\r\n        \"elementType\": \"geometry\",\r\n        \"stylers\": [\r\n            {\r\n                \"color\": \"#f5f5f5\"\r\n            },\r\n            {\r\n                \"lightness\": 20\r\n            }\r\n        ]\r\n    },\r\n    {\r\n        \"featureType\": \"poi\",\r\n        \"elementType\": \"geometry\",\r\n        \"stylers\": [\r\n            {\r\n                \"color\": \"#f5f5f5\"\r\n            },\r\n            {\r\n                \"lightness\": 21\r\n            },\r\n            {\r\n                \"visibility\": \"on\"\r\n            }\r\n        ]\r\n    },\r\n    {\r\n        \"featureType\": \"poi.attraction\",\r\n        \"elementType\": \"geometry\",\r\n        \"stylers\": [\r\n            {\r\n                \"visibility\": \"on\"\r\n            }\r\n        ]\r\n    },\r\n    {\r\n        \"featureType\": \"poi.attraction\",\r\n        \"elementType\": \"labels.text\",\r\n        \"stylers\": [\r\n            {\r\n                \"visibility\": \"on\"\r\n            }\r\n        ]\r\n    },\r\n    {\r\n        \"featureType\": \"poi.government\",\r\n        \"elementType\": \"geometry\",\r\n        \"stylers\": [\r\n            {\r\n                \"visibility\": \"on\"\r\n            }\r\n        ]\r\n    },\r\n    {\r\n        \"featureType\": \"poi.government\",\r\n        \"elementType\": \"labels.text\",\r\n        \"stylers\": [\r\n            {\r\n                \"visibility\": \"off\"\r\n            },\r\n            {\r\n                \"color\": \"#cbbdf9\"\r\n            }\r\n        ]\r\n    },\r\n    {\r\n        \"featureType\": \"poi.park\",\r\n        \"elementType\": \"geometry\",\r\n        \"stylers\": [\r\n            {\r\n                \"color\": \"#dedede\"\r\n            },\r\n            {\r\n                \"lightness\": 21\r\n            },\r\n            {\r\n                \"visibility\": \"on\"\r\n            }\r\n        ]\r\n    },\r\n    {\r\n        \"featureType\": \"road.highway\",\r\n        \"elementType\": \"geometry.fill\",\r\n        \"stylers\": [\r\n            {\r\n                \"color\": \"#FCD400\"\r\n            },\r\n            {\r\n                \"lightness\": 17\r\n            }\r\n        ]\r\n    },\r\n    {\r\n        \"featureType\": \"road.highway\",\r\n        \"elementType\": \"geometry.stroke\",\r\n        \"stylers\": [\r\n            {\r\n                \"color\": \"#FCD400\"\r\n            },\r\n            {\r\n                \"lightness\": 29\r\n            },\r\n            {\r\n                \"weight\": 0.2\r\n            },\r\n            {\r\n                \"visibility\": \"on\"\r\n            }\r\n        ]\r\n    },\r\n    {\r\n        \"featureType\": \"road.arterial\",\r\n        \"elementType\": \"geometry\",\r\n        \"stylers\": [\r\n            {\r\n                \"color\": \"#3c3c3c\"\r\n            },\r\n            {\r\n                \"lightness\": 18\r\n            },\r\n            {\r\n                \"weight\": \"0.97\"\r\n            }\r\n        ]\r\n    },\r\n    {\r\n        \"featureType\": \"road.local\",\r\n        \"elementType\": \"geometry\",\r\n        \"stylers\": [\r\n            {\r\n                \"color\": \"#505050\"\r\n            },\r\n            {\r\n                \"lightness\": 16\r\n            },\r\n            {\r\n                \"gamma\": \"1.16\"\r\n            },\r\n            {\r\n                \"weight\": \"0.49\"\r\n            }\r\n        ]\r\n    },\r\n    {\r\n        \"featureType\": \"transit\",\r\n        \"elementType\": \"geometry\",\r\n        \"stylers\": [\r\n            {\r\n                \"color\": \"#6e6e6e\"\r\n            },\r\n            {\r\n                \"lightness\": 19\r\n            }\r\n        ]\r\n    },\r\n    {\r\n        \"featureType\": \"water\",\r\n        \"elementType\": \"geometry\",\r\n        \"stylers\": [\r\n            {\r\n                \"color\": \"#6e6e6e\"\r\n            },\r\n            {\r\n                \"lightness\": 17\r\n            }\r\n        ]\r\n    }\r\n\r\n]\r\n    });\r\n    directionsDisplay.setMap(map);\r\n    directionsDisplay.setPanel(document.getElementById('panel'));\r\n    var request = {\r\n      origin: originx,\r\n      destination: destinx,\r\n      travelMode: google.maps.DirectionsTravelMode.DRIVING\r\n    };\r\n    directionsService.route(request, function(response, status) {\r\n      if (status == google.maps.DirectionsStatus.OK) {\r\n        directionsDisplay.setDirections(response);\r\n      }\r\n    });\r\n  }\r\n<\/script>  \t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>From your location From Chania Airport From Souda Port From Heraklion Airport From Heraklion Port Drag point &#8220;B&#8221; (marker) to any point you want on the map. This will give you the distance, directions and destination (at the bottom of the directions).Have a good trip.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"elementor_header_footer","meta":{"_acf_changed":false,"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","footnotes":""},"class_list":["post-1453","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.chaniataxi.gr\/en\/wp-json\/wp\/v2\/pages\/1453","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.chaniataxi.gr\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.chaniataxi.gr\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.chaniataxi.gr\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.chaniataxi.gr\/en\/wp-json\/wp\/v2\/comments?post=1453"}],"version-history":[{"count":4,"href":"https:\/\/www.chaniataxi.gr\/en\/wp-json\/wp\/v2\/pages\/1453\/revisions"}],"predecessor-version":[{"id":1457,"href":"https:\/\/www.chaniataxi.gr\/en\/wp-json\/wp\/v2\/pages\/1453\/revisions\/1457"}],"wp:attachment":[{"href":"https:\/\/www.chaniataxi.gr\/en\/wp-json\/wp\/v2\/media?parent=1453"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}