{"id":23249,"date":"2024-01-26T08:34:31","date_gmt":"2024-01-26T13:34:31","guid":{"rendered":"https:\/\/www.ariston-oliveoil.gr\/?page_id=23249"},"modified":"2024-04-01T04:54:33","modified_gmt":"2024-04-01T08:54:33","slug":"store-locator","status":"publish","type":"page","link":"https:\/\/www.ariston-oliveoil.gr\/el\/store-locator\/","title":{"rendered":"Store locator"},"content":{"rendered":"<div data-elementor-type=\"wp-page\" data-elementor-id=\"23249\" class=\"elementor elementor-23249\">\n\t\t\t\t<div class=\"wd-negative-gap elementor-element elementor-element-4e4b4daf e-flex e-con-boxed wd-section-disabled e-con e-parent\" data-id=\"4e4b4daf\" 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-395198b3 color-scheme-inherit text-left elementor-widget elementor-widget-text-editor\" data-id=\"395198b3\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<style>\/*! elementor - v3.21.0 - 25-04-2024 *\/\n.elementor-widget-text-editor.elementor-drop-cap-view-stacked .elementor-drop-cap{background-color:#69727d;color:#fff}.elementor-widget-text-editor.elementor-drop-cap-view-framed .elementor-drop-cap{color:#69727d;border:3px solid;background-color:transparent}.elementor-widget-text-editor:not(.elementor-drop-cap-view-default) .elementor-drop-cap{margin-top:8px}.elementor-widget-text-editor:not(.elementor-drop-cap-view-default) .elementor-drop-cap-letter{width:1em;height:1em}.elementor-widget-text-editor .elementor-drop-cap{float:left;text-align:center;line-height:1;font-size:50px}.elementor-widget-text-editor .elementor-drop-cap-letter{display:inline-block}<\/style>\t\t\t\t<!-- wp:paragraph -->\n<p><script language=\"javascript\">\n\tvar map,pin_lat,pin_long,lat,long,latlong=new Array();\n\tvar markers = [];\n\tvar currentLat = '';\n\tvar currentLong = '';\n\tvar geocoder = new google.maps.Geocoder();\n\tvar bounds = new google.maps.LatLngBounds();\n\t\n\tlat='';\n\tlong='';\n\tif(!lat) lat=currentLat;\n\tif(!long) long=currentLong;\n\tvar $j = jQuery.noConflict();\n\t$j(document).ready(function($){\n\t\tinitialize(lat,long);\n\t\t\t\tgeocodePosition(lat,long);\n\t\t\t});\n\tgoogle.maps.event.addDomListener(window, 'load', initiate);\n\t\n\tfunction initiate() \n\t{\n\t  var input = document.getElementById('searchTextField');\n\t  autocomplete = new google.maps.places.Autocomplete(input);\n\t}\n\t\n\tfunction initialize(lat,long) \n\t{\n\t\tvar latlng = new google.maps.LatLng(lat,long);\n\t\tvar myOptions = {\n\t\t\tzoom: 13,\n\t\t\tcenter: latlng,\n\t\t\tpanControl: true,\n\t\t\tzoomControl: true,\n\t\t\tscaleControl: true,\n\t\t\tmapTypeId: google.maps.MapTypeId.ROADMAP\n\t\t}\n\t\tmap = new google.maps.Map(document.getElementById(\"map_canvas\"), myOptions);\n\t\tvar marker1 = new google.maps.Marker({\n\t\t\tmap: map,\n\t\t\ttitle: 'Me',\n\t\t\tdraggable:true,\t\n\t\t\ticon: 'https:\/\/www.ariston-oliveoil.gr\/wp-content\/plugins\/gwebpro-store-locator\/images\/me_map.png',\n\t\t\tposition: latlng,\n\t\t\tanimation: google.maps.Animation.DROP\n\t\t});\n\t\tsetTimeout(function(){ placeStores(latlong); }, 1800);\n\t\t\n\t\tgoogle.maps.event.addListener(marker1, 'dragend', function() {\n\t\t\tvar point = marker1.getPosition();\n\t\t\tconsole.log(point);\n\t\t\tmap.panTo(point);\n\t\t\tpin_lat=point.lat();\n\t\t\tpin_long=point.lng();\n\t\t\tdocument.location=formatUrl('lat='+pin_lat+'&long='+pin_long); \n\t\t});\n\t\tgoogle.maps.event.addListener(marker1, 'click', function() {\n\t\t  var e=this;\n\t\t  e.setAnimation(google.maps.Animation.BOUNCE);\n\t\t  setTimeout(function(){ e.setAnimation(null); }, 700);\n\t\t});\n\t}\n\t\n\tfunction placeStores(stores)\n\t{\n\t\tfor (i = 0; i < stores.length; i++) {\n\t\t\tvar position = new google.maps.LatLng(stores[i][0], stores[i][1]);\n\t\t\tbounds.extend(position);\n\t\t\tvar markerOptions = {\n\t\t\t\tposition: position,\n\t\t\t\tmap: map,\n\t\t\t\tanimation: google.maps.Animation.DROP\n\t\t\t}\n\t\t\tmarker = new google.maps.Marker(markerOptions);\n\t\t\tmarkers.push(marker);\n\t\t\tmap.fitBounds(bounds);\n    \t\tmap.panToBounds(bounds);\n\t\t\tgoogle.maps.event.addListener(marker, 'click', (function (marker, i) {\n\t\t\t\treturn function () {\n\t\t\t\t\tvar e=this;\n\t\t\t\t   e.setAnimation(google.maps.Animation.BOUNCE);\n\t\t\t\t   setTimeout(function(){ e.setAnimation(null); }, 700);\n\t\t\t\t\tvar infoboxOptions =  {\n\t\t\t\t\t content: '<img decoding=\"async\" src=\"https:\/\/www.ariston-oliveoil.gr\/wp-content\/plugins\/gwebpro-store-locator\/images\/top_arrow.png\" class=\"top_arrow\"><div>'+stores[i][3]+'<\/div>',\n\t\t\t\t\t closeBoxURL: 'https:\/\/www.ariston-oliveoil.gr\/wp-content\/plugins\/gwebpro-store-locator\/images\/close_button.png',\n\t\t\t\t\t pixelOffset: new google.maps.Size(-160, 20)\n\t\t\t\t\t};\n\t\t\t\t\tmarkers[i].infobox = new InfoBox(infoboxOptions);\n\t\t\t\t\tfor (var j = 0; j < markers.length; j++) {\n\t\t\t\t\t\tif(typeof  markers[j].infobox!='undefined')\n\t\t\t\t\t\t\tmarkers[j].infobox.close();\n\t\t\t\t\t}\n\t\t\t\t\tmarkers[i].infobox.open(map, this);\n\t\t\t\t}\n\t\t\t})(marker, i));\n\t\t}\n\t}\n\t\n\tfunction launchInfoWindow(x) {\n\t\tmarkers[x].setAnimation(google.maps.Animation.BOUNCE);\n\t\tsetTimeout(function(){ markers[x].setAnimation(null); }, 700);\n\t\tgoogle.maps.event.trigger(markers[x], \"click\");\n\t\t$j('html,body').animate({scrollTop: $j(\"#map_canvas\").offset().top-150},'slow');\n\t}\n\n\t\n\tfunction addressurls(address) {\n\t\taddress = address.replace(\/[`~!@#$%^&#038;*()_|+\\-=?;:'\".<>\\{\\}\\[\\]\\\\\\\/]\/gi, '');\n\t\tgeocoder.geocode({'address': address}, function postcodesearch(results, status) \n\t\t{   \n\t\t  console.log(status);\n\t\t  if (status == google.maps.GeocoderStatus.OK) \n\t\t  {\n\t\t\tvar lat = results[0].geometry.location.lat();\n\t\t\tvar lng = results[0].geometry.location.lng();\n\t\t\tdocument.location=formatUrl('dest='+encode(address)+'&lat='+lat+'&long='+lng);\n\t\t  }\n\t\t  else {\n\t\t\talert(\"Entered address not found.\");\n\t\t  }\n\t\t});\n\t}\n\t\n\tfunction formatUrl(url)\n\t{\n\t\tvar currUrl='https:\/\/www.ariston-oliveoil.gr\/el\/store-locator\/';\n\t\tif(currUrl.indexOf(\"?\")==-1)\n\t\t\treturn currUrl+'?'+url;\n\t\telse\n\t\t\treturn currUrl+'&'+url;\n\t}\n\t\n\tfunction geocodePosition(lat,long) {\n\t  var latlng = new google.maps.LatLng(lat,long);\n\t  geocoder.geocode({\n\t\tlatLng: latlng\n\t  }, function(responses) {\n\t\tif (responses && responses.length > 0) {\n\t\t\tvar arrAddress=responses[0].address_components;\n\t\t\tvar itemLocality=\"\",address=\"\",country=\"\",place=\"\";\n\t\t\t$j.each(arrAddress, function (i, address_component) {\n\t\t\t\t\n\t\t\t\tif (address_component.types[0] == \"route\" && (typeof  address_component.long_name!='undefined')){\n\t\t\t\t\tplace = address_component.long_name+', ';\n\t\t\t\t}\n\t\t\t\t if (address_component.types[0] == \"locality\" && (typeof  address_component.long_name!='undefined')){\n\t\t\t\t\titemLocality = address_component.long_name+', ';\n\t\t\t\t}\n\t\t\t\tif (address_component.types[0] == \"administrative_area_level_1\" && (typeof  address_component.long_name!='undefined')){\n\t\t\t\t\taddress = address_component.short_name+', ';\n\t\t\t\t}\n\t\t\t\tif (address_component.types[0] == \"country\" && (typeof  address_component.long_name!='undefined')){\n\t\t\t\t\tcountry = address_component.long_name;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t});\n\t\t\tvar str=place+itemLocality+address+country;\n\t\t\t$j('#searchTextField').val(responses[0].formatted_address);\n\t\t\t$j('.locationname').html(responses[0].formatted_address);\n\t\t} \n\t  });\n\t}\n\tfunction direction(addr)\n\t{\n\t\t\t\t\twindow.open('https:\/\/maps.google.ca\/maps?saddr='+encode($j('#searchTextField').val())+'&daddr='+encode(addr),'_newtab');\n\t\t\t}\n\tfunction encode(str) {\n\t\tvar result = \"\";\n\t\tfor (i = 0; i < str.length; i++) {\n\t\t\tif (str.charAt(i) ==\" \") result += \"+\";\n\t\t\telse result += str.charAt(i);\n\t\t}\n\t\treturn escape(result);\n\t}\n\twindow.onload = loadScript;\n\tfunction loadScript() {\n        jQuery('html, body').animate({scrollTop: jQuery('.home_map').offset().top-50}, 2100);\n    }\n<\/script>\n<div class=\"inner_wrap\">\n    <div class=\"inner_contarea\">\n        <div>\n            <div class=\"inner_lsb\">\n                <div class=\"locationsearch_home\">\n                    <div class=\"location\">\n                        <div class=\"me\"><img decoding=\"async\" src=\"https:\/\/www.ariston-oliveoil.gr\/wp-content\/plugins\/gwebpro-store-locator\/images\/me_map.png\" \/><div class=\"hdr\"><p>\u0397 \u03c0\u03c1\u03ac\u03c3\u03b9\u03bd\u03b7 \u03ba\u03b1\u03c1\u03c6\u03af\u03c4\u03c3\u03b1 \u03b8\u03b1 \u03c7\u03c1\u03b7\u03c3\u03b9\u03bc\u03bf\u03c0\u03bf\u03b9\u03b7\u03b8\u03b5\u03af \u03c9\u03c2 \u03c3\u03b7\u03bc\u03b5\u03af\u03bf \u03b1\u03bd\u03b1\u03c6\u03bf\u03c1\u03ac\u03c2 \u03b3\u03b9\u03b1 \u03b1\u03bd\u03b1\u03b6\u03ae\u03c4\u03b7\u03c3\u03b7.<\/p><\/div><\/div>\n                        <div class=\"locationname\">\u03a6\u03cc\u03c1\u03c4\u03c9\u03c3\u03b7 \u03c4\u03bf\u03c0\u03bf\u03b8\u03b5\u03c3\u03af\u03b1\u03c2...<\/div>\n                        <div class=\"popupbox\">\n                            <div class=\"contbox\">\n                                <p>\u0395\u03b9\u03c3\u03b1\u03b3\u03ac\u03b3\u03b5\u03c4\u03b5 \u03c4\u03bf\u03bd \u03c4\u03b1\u03c7\u03c5\u03b4\u03c1\u03bf\u03bc\u03b9\u03ba\u03cc \u03c3\u03b1\u03c2 \u03ba\u03ce\u03b4\u03b9\u03ba\u03b1 \u03ae \u03bc\u03b9\u03b1 \u03c0\u03cc\u03bb\u03b7 \u03b3\u03b9\u03b1 \u03bd\u03b1 \u03c4\u03c1\u03bf\u03c0\u03bf\u03c0\u03bf\u03b9\u03ae\u03c3\u03b5\u03c4\u03b5 \u03c4\u03b7\u03bd \u03c4\u03c1\u03ad\u03c7\u03bf\u03c5\u03c3\u03b1 \u03c4\u03bf\u03c0\u03bf\u03b8\u03b5\u03c3\u03af\u03b1 \u03c3\u03b1\u03c2:<\/p>\n                                <input id=\"searchTextField\" type=\"text\" \/>\n                                <fieldset>\n                                    <input type=\"button\" onclick=\"addressurls($j('#searchTextField').val());\" value=\"\u0395\u03bd\u03c4\u03ac\u03be\u03b5\u03b9\" \/>\n                                <\/fieldset>\n                                <div class=\"clear\"><\/div>\n                            <\/div>\n                        <\/div>\n                        <div class=\"clear\"><\/div>\n                    <\/div>\n                    <div class=\"clear\"><\/div>\n                <\/div>\n                <div class=\"home_map\"><div id=\"map_canvas\" style=\"width:100%px;height:600pxpx;\"><\/div><\/div>\n                \n                <div>\n                    <h2>\u039a\u03b1\u03c4\u03b1\u03c3\u03c4\u03ae\u03c3\u03c4\u03b5 \u03bb\u03af\u03c3\u03c4\u03b5\u03c2 \u03ba\u03bf\u03bd\u03c4\u03ac \u03c3\u03b1\u03c2<\/h2>\n                    <div>\n                        <div class=\"homelilst_wrap\">\n                            <div id=\"paging_container\">\n                                <div class=\"page_navigation\" id=\"nav_clone\"><\/div>\n                                <div class=\"clear\"><\/div>\n                                \t\t<ul class=\"content\">\n\t\t\t\t<\/ul>\n        <div class=\"page_navigation\" id=\"nav_main\"><\/div>\n        <script type=\"text\/javascript\">$j('#nav_clone').html($j('#nav_main').html());<\/script>\n        <div class=\"clear\"><\/div>\n                    <script>$j('.page_navigation').hide();<\/script>\n                            <div class=\"no-result\">\u0394\u03b5\u03bd \u03b2\u03c1\u03ad\u03b8\u03b7\u03ba\u03b1\u03bd \u03ba\u03b1\u03c4\u03b1\u03c3\u03c4\u03ae\u03bc\u03b1\u03c4\u03b1 \u03ba\u03bf\u03bd\u03c4\u03ac \u03c3\u03c4\u03b7\u03bd \u03c4\u03c1\u03ad\u03c7\u03bf\u03c5\u03c3\u03b1 \u03c4\u03bf\u03c0\u03bf\u03b8\u03b5\u03c3\u03af\u03b1 \u03c3\u03b1\u03c2.<\/div>\n                                    <\/div>\n                        <\/div>\n                    <\/div>\n                <\/div>\n            <\/div>\n            <div class=\"clear\"><\/div>\n        <\/div>\n    <\/div>\n<\/div><\/p>\n<!-- \/wp:paragraph -->\t\t\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>","protected":false},"excerpt":{"rendered":"","protected":false},"author":127,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/www.ariston-oliveoil.gr\/el\/wp-json\/wp\/v2\/pages\/23249"}],"collection":[{"href":"https:\/\/www.ariston-oliveoil.gr\/el\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.ariston-oliveoil.gr\/el\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.ariston-oliveoil.gr\/el\/wp-json\/wp\/v2\/users\/127"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ariston-oliveoil.gr\/el\/wp-json\/wp\/v2\/comments?post=23249"}],"version-history":[{"count":0,"href":"https:\/\/www.ariston-oliveoil.gr\/el\/wp-json\/wp\/v2\/pages\/23249\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.ariston-oliveoil.gr\/el\/wp-json\/wp\/v2\/media?parent=23249"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}