{"id":4394,"date":"2020-07-24T10:37:32","date_gmt":"2020-07-24T08:37:32","guid":{"rendered":"https:\/\/www.saone-tourisme.fr\/hebergements\/"},"modified":"2021-11-04T14:21:38","modified_gmt":"2021-11-04T13:21:38","slug":"where-to-sleep","status":"publish","type":"page","link":"https:\/\/www.saone-tourisme.fr\/en\/plan-my-trip\/where-to-sleep\/","title":{"rendered":"Where to sleep"},"content":{"rendered":"<div class=\"wpb-content-wrapper\"><p>[vc_row][vc_column][vc_column_text]<\/p>\n<h1>GET A GOOD NIGHT\u2019S SLEEP<\/h1>\n<p>[\/vc_column_text][vc_column_text]<\/p>\n<h2 class=\"chapeau\">Whether you\u2019re dreaming of a comfortable bed, a night in the great outdoors or to share some quality time with your hosts, you\u2019ll find the accommodation to suit your needs in Rives en Sa\u00f4ne. You could even spend a night in a cottage on the water.<\/h2>\n<p>[\/vc_column_text]<div class='vc_row wpb_row vc_row-fluid chapeau custom_bg vc_row-has-fill'>\n\t<div class=\"wpb_column vc_column_container vc_col-sm-12\">\n\t\t<div class=\"vc_column-inner\"><\/div>\n\t<\/div>\n<\/div>\n\n<script>\n\tlayers = [];\n\tif(jQuery('.wpb_content_element').length > 0){\n\t\tjQuery('.custom_bg .vc_column_container .vc_column-inner').append(jQuery('.wpb_content_element'));\n\t\tjQuery('.contenuPage').prepend(jQuery('.custom_bg'));\n\t\tjQuery('.custom_bg').css('background-color', '#0a9a9b');\n\t}\n\t\n<\/script>\n\n<!-- CARTE ET LISTE -->\n<div class=\"row\" style=\"max-width:1500px; margin:auto;\">\n\n\t<!-- MOTEUR DE RECHERCHE -->\n\t\n\t<!-- CARTE -->\n\t<div class=\"col-lg-6 col-md-5 col-sm-6 mapvueliste\">\n\t\t<div id=\"blocmap\" class=\"mapliste\"><\/div>\n\t<\/div>\n\t<script>\n\t\tvar mylatlng = [47.050737, 5.190913];\n\t\tvar mymap = L.map('blocmap', { dragging: !L.Browser.mobile }).setView(mylatlng, 11);\n\t\tvar layerMarker = L.layerGroup().addTo(mymap);\n\t\tL.tileLayer('https:\/\/{s}.tile.openstreetmap.org\/{z}\/{x}\/{y}.png', {maxZoom: 19,\tattribution: '&copy; <a href=\"http:\/\/www.openstreetmap.org\/copyright\">OpenStreetMap<\/a>'}).addTo(mymap);\n\t<\/script>\n\n\t<!-- DEBUT LISTE -->\n\t<div id='listcat' class=\"listeItems col-lg-6 col-md-7 col-sm-6\">\n\t<\/div>\n<\/div>\n\n<script>\n\tjQuery('document').ready(function(){\n\t\tjQuery('body > .row').replaceWith(jQuery('.contenuPage .row'));\n\t});\n<\/script>      <script src=\"https:\/\/code.jquery.com\/jquery-3.3.1.min.js\" charset=\"utf-8\"><\/script>\n      <script type=\"text\/javascript\">\n    var canSearch = true;\n    var lang = 'en';\n    var items = [293191,293243,293157,293237,293219,293107,293235,293165,293139,293173,293231,293169,293103,293099,293185,293129,293229,293135,293123,293217,293119,293223,293097,293181,293193,293195,293233,293155,293125,293159,293215,293203,293241,293105,293109,293163,293145,293161,293183,293131,293189,293141,293207,293147,293151,293205,293175,293143,293227,293171,293225,293127,293137,293133,293093,293199,293153,293249,293197,293167,293101,293245,293095,293211,293213,293179,293209,293177,293201,293221,293149,293247,293187,293113,293121,293239,293117,293115,293111];\n    var showItems = '';\n    var fields = [];\n    var layers = [];\n    var lastpage = 0;\n    var newLoad = true;\n    var tmpl = 'srit';\n    var filters = false;\n    var end = false;\n    function loadList(){\n      if (!newLoad) {\n        \/\/ displayItems();\n      }\n    }\n\n    jQuery(window).scroll(function (event) {\n      jQuery(this).delay(1000).queue(function(){\n        var scroll = jQuery(window).scrollTop();\n        var bottom = jQuery('#listcat').offset().top + jQuery('#listcat').outerHeight(true) - 500;\n\n        if (bottom <= scroll && !end && lastpage != 0) {\n          getItems();\n        }\n        jQuery(this).dequeue();\n      });\n    });\n\n    function getItems(){\n      if (showItems == '') {\n        var itemsToShow = JSON.stringify(items);\n      } else {\n        var itemsToShow = JSON.stringify(showItems);\n      }\n      if (showItems !== '') {\n        if (showItems.length == 0) {\n          jQuery('#listcat').html('<p>Aucun r\u00e9sultat<\/p>');\n          jQuery('#loader').hide();\n          return;\n        }\n      }\n      var url = 'https:\/\/www.saone-tourisme.fr\/wp-content\/plugins\/TourinsoftMVC\/models\/frontend\/ajaxScriptManager.php?getPosts=true';\n      jQuery.ajax({\n        url: url,\n        type: 'post',\n        data: 'lastpage='+lastpage+'&lang='+lang+'&items='+itemsToShow+'&tmpl='+tmpl,\n        success: function(result, status){\n          jQuery('#loader').hide();\n          if (result) {\n            jQuery(result).appendTo('#listcat');\n          } else {\n            end = true;\n          }\n          \/\/ console.log(result);\n          lastpage++;\n          \/\/ displayItems();\n          \/\/ loadMarkers();\n        }\n      });\n    }\n\n    jQuery('.formreserver').on('submit', function(e){\n      newLoad = true;\n      lastpage = 0;\n      \/\/showItems = '';\n      e.preventDefault();\n      var datas = jQuery(this).serialize();\n      jQuery('#listcat').html('');\n      jQuery('#loader').show();\n      deleteMarkers();\n      if (canSearch) {\n        canSearch = false;\n        getSearch(datas);\n      }\n    });\n\n\n    function getSearch(datas){\n      var url = 'https:\/\/www.saone-tourisme.fr\/wp-content\/plugins\/TourinsoftMVC\/models\/frontend\/ajaxScriptManager.php?getSearch=true';\n      jQuery.ajax({\n        url: url,\n        type: 'post',\n        data: 'items='+JSON.stringify(items)+'&'+datas,\n        success: function(result, status){\n          canSearch = true;\n          console.log(result);\n          if (result) {\n            showItems = JSON.parse(result);\n            \/\/ jQuery(result).appendTo('#listcat');\n            end = false;\n          } else {\n            end = true;\n          }\n          getItems();\n        }\n      });\n    }\n    function deleteMarkers(){\n      layers.forEach(function(layer){\n        mymap.removeLayer(layer);\n      });\n      layers = [];\n      layerMarker.clearLayers();\n    }\n\n    function bindMarker(id){\n      var markerToBind = layers[id];\n      markerToBind.openPopup();\n    }\n\n    function setMarkers(markers) {\n      markers = JSON.parse(markers);\n      \/\/ var myIcon = L.icon({\n      \/\/   iconUrl: \"\/wp-content\/themes\/samoens\/img\/marker.png\",\n      \/\/   iconSize: [25,41],\n      \/\/   iconAnchor: [12,40],\n      \/\/   popupAnchor: [1, -40]\n      \/\/ });\n\n      jQuery.each(markers,function(index, marker, array){\n        layers.push(L.marker([marker.MarkerListLat, marker.MarkerListLng]).bindPopup(\"<a href=\\'\"+marker.MarkerListUrl+\"\\'><p><b>\"+marker.MarkerListTitle+\"<\/b><\/p><img width=\\'200px\\' src=\\'\"+marker.MarkerListImg+\" \\'><p>\"+marker.MarkerListInfo+\"<\/p><\/a>\").addTo(mymap));\n      });\n    }\n\n    getItems();\n    <\/script>\n      [\/vc_column][\/vc_row]<\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>[vc_row][vc_column][vc_column_text] GET A GOOD NIGHT\u2019S SLEEP [\/vc_column_text][vc_column_text] Whether you\u2019re dreaming of a comfortable bed, a night in the great outdoors or to share some quality time with your hosts, you\u2019ll find the accommodation to suit your needs in Rives en Sa\u00f4ne. You could even spend a night in a cottage on the water. [\/vc_column_text][\/vc_column][\/vc_row]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":4397,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"template_liste.php","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-4394","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.saone-tourisme.fr\/en\/wp-json\/wp\/v2\/pages\/4394","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.saone-tourisme.fr\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.saone-tourisme.fr\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.saone-tourisme.fr\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.saone-tourisme.fr\/en\/wp-json\/wp\/v2\/comments?post=4394"}],"version-history":[{"count":2,"href":"https:\/\/www.saone-tourisme.fr\/en\/wp-json\/wp\/v2\/pages\/4394\/revisions"}],"predecessor-version":[{"id":15729,"href":"https:\/\/www.saone-tourisme.fr\/en\/wp-json\/wp\/v2\/pages\/4394\/revisions\/15729"}],"up":[{"embeddable":true,"href":"https:\/\/www.saone-tourisme.fr\/en\/wp-json\/wp\/v2\/pages\/4397"}],"wp:attachment":[{"href":"https:\/\/www.saone-tourisme.fr\/en\/wp-json\/wp\/v2\/media?parent=4394"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}