Rete #adessonews

Offerte Lavastoviglie Unieuro con prezzi

[]
“).appendTo(that.$node); return new Dataset(oDataset, www); } } .mixin(Menu.prototype, EventEmitter, { _onSelectableClick: function onSelectableClick($e) { this.trigger(“selectableClicked”, $($e.currentTarget)); }, _onRendered: function onRendered(type, dataset, suggestions, async) { this.$node.toggleClass(this.classes.empty, this._allDatasetsEmpty()); this.trigger(“datasetRendered”, dataset, suggestions, async); }, _onCleared: function onCleared() { this.$node.toggleClass(this.classes.empty, this._allDatasetsEmpty()); this.trigger(“datasetCleared”); }, _propagate: function propagate() { this.trigger.apply(this, arguments); }, _allDatasetsEmpty: function allDatasetsEmpty() { return _.every(this.datasets, isDatasetEmpty); function isDatasetEmpty(dataset) { return dataset.isEmpty(); } }, _getSelectables: function getSelectables() { return this.$node.find(this.selectors.selectable); }, _removeCursor: function _removeCursor() { var $selectable = this.getActiveSelectable(); $selectable && $selectable.removeClass(this.classes.cursor); }, _ensureVisible: function ensureVisible($el) { var elTop, elBottom, nodeScrollTop, nodeHeight; elTop = $el.position().top; elBottom = elTop + $el.outerHeight(true); nodeScrollTop = this.$node.scrollTop(); nodeHeight = this.$node.height() + parseInt(this.$node.css(“paddingTop”), 10) + parseInt(this.$node.css(“paddingBottom”), 10); if (elTop “); _.each(this.datasets, destroyDataset); function destroyDataset(dataset) { dataset.destroy(); } } }); return Menu; }(); var DefaultMenu = function() { “use strict”; var s = Menu.prototype; function DefaultMenu() { Menu.apply(this, [].slice.call(arguments, 0)); } _.mixin(DefaultMenu.prototype, Menu.prototype, { open: function open() { !this._allDatasetsEmpty() && this._show(); return s.open.apply(this, [].slice.call(arguments, 0)); }, close: function close() { this._hide(); return s.close.apply(this, [].slice.call(arguments, 0)); }, _onRendered: function onRendered() { if (this._allDatasetsEmpty()) { this._hide(); } else { this.isOpen() && this._show(); } return s._onRendered.apply(this, [].slice.call(arguments, 0)); }, _onCleared: function onCleared() { if (this._allDatasetsEmpty()) { this._hide(); } else { this.isOpen() && this._show(); } return s._onCleared.apply(this, [].slice.call(arguments, 0)); }, setLanguageDirection: function setLanguageDirection(dir) { this.$node.css(dir === “ltr” ? this.css.ltr : this.css.rtl); return s.setLanguageDirection.apply(this, [].slice.call(arguments, 0)); }, _hide: function hide() { this.$node.hide(); }, _show: function show() { this.$node.css(“display”, “block”); } }); return DefaultMenu; }(); var Typeahead = function() { “use strict”; function Typeahead(o, www) { var onFocused, onBlurred, onEnterKeyed, onTabKeyed, onEscKeyed, onUpKeyed, onDownKeyed, onLeftKeyed, onRightKeyed, onQueryChanged, onWhitespaceChanged; o = o || {}; if (!o.input) { $.error(“missing input”); } if (!o.menu) { $.error(“missing menu”); } if (!o.eventBus) { $.error(“missing event bus”); } www.mixin(this); this.eventBus = o.eventBus; this.minLength = _.isNumber(o.minLength) ? o.minLength : 1; this.input = o.input; this.menu = o.menu; this.enabled = true; this.active = false; this.input.hasFocus() && this.activate(); this.dir = this.input.getLangDir(); this._hacks(); this.menu.bind().onSync(“selectableClicked”, this._onSelectableClicked, this).onSync(“asyncRequested”, this._onAsyncRequested, this).onSync(“asyncCanceled”, this._onAsyncCanceled, this).onSync(“asyncReceived”, this._onAsyncReceived, this).onSync(“datasetRendered”, this._onDatasetRendered, this).onSync(“datasetCleared”, this._onDatasetCleared, this); onFocused = c(this, “activate”, “open”, “_onFocused”); onBlurred = c(this, “deactivate”, “_onBlurred”); onEnterKeyed = c(this, “isActive”, “isOpen”, “_onEnterKeyed”); onTabKeyed = c(this, “isActive”, “isOpen”, “_onTabKeyed”); onEscKeyed = c(this, “isActive”, “_onEscKeyed”); onUpKeyed = c(this, “isActive”, “open”, “_onUpKeyed”); onDownKeyed = c(this, “isActive”, “open”, “_onDownKeyed”); onLeftKeyed = c(this, “isActive”, “isOpen”, “_onLeftKeyed”); onRightKeyed = c(this, “isActive”, “isOpen”, “_onRightKeyed”); onQueryChanged = c(this, “_openIfActive”, “_onQueryChanged”); onWhitespaceChanged = c(this, “_openIfActive”, “_onWhitespaceChanged”); this.input.bind().onSync(“focused”, onFocused, this).onSync(“blurred”, onBlurred, this).onSync(“enterKeyed”, onEnterKeyed, this).onSync(“tabKeyed”, onTabKeyed, this).onSync(“escKeyed”, onEscKeyed, this).onSync(“upKeyed”, onUpKeyed, this).onSync(“downKeyed”, onDownKeyed, this).onSync(“leftKeyed”, onLeftKeyed, this).onSync(“rightKeyed”, onRightKeyed, this).onSync(“queryChanged”, onQueryChanged, this).onSync(“whitespaceChanged”, onWhitespaceChanged, this).onSync(“langDirChanged”, this._onLangDirChanged, this); } _.mixin(Typeahead.prototype, { _hacks: function hacks() { var $input, $menu; $input = this.input.$input || $(“

“); $menu = this.menu.$node || $(“”); $input.on(“blur.tt”, function($e) { var active, isActive, hasActive; active = document.activeElement; isActive = $menu.is(active); hasActive = $menu.has(active).length > 0; if (.isMsie() && (isActive || hasActive)) { $e.preventDefault(); $e.stopImmediatePropagation(); .defer(function() { $input.focus(); }); } }); $menu.on(“mousedown.tt”, function($e) { $e.preventDefault(); }); }, _onSelectableClicked: function onSelectableClicked(type, $el) { this.select($el); }, _onDatasetCleared: function onDatasetCleared() { this._updateHint(); }, _onDatasetRendered: function onDatasetRendered(type, dataset, suggestions, async) { this._updateHint(); this.eventBus.trigger(“render”, suggestions, async, dataset); }, _onAsyncRequested: function onAsyncRequested(type, dataset, query) { this.eventBus.trigger(“asyncrequest”, query, dataset); }, _onAsyncCanceled: function onAsyncCanceled(type, dataset, query) { this.eventBus.trigger(“asynccancel”, query, dataset); }, _onAsyncReceived: function onAsyncReceived(type, dataset, query) { this.eventBus.trigger(“asyncreceive”, query, dataset); }, _onFocused: function onFocused() { this._minLengthMet() && this.menu.update(this.input.getQuery()); }, _onBlurred: function onBlurred() { if (this.input.hasQueryChangedSinceLastFocus()) { this.eventBus.trigger(“change”, this.input.getQuery()); } }, _onEnterKeyed: function onEnterKeyed(type, $e) { var $selectable; if ($selectable = this.menu.getActiveSelectable()) { this.select($selectable) && $e.preventDefault(); } }, _onTabKeyed: function onTabKeyed(type, $e) { var $selectable; if ($selectable = this.menu.getActiveSelectable()) { this.select($selectable) && $e.preventDefault(); } else if ($selectable = this.menu.getTopSelectable()) { this.autocomplete($selectable) && $e.preventDefault(); } }, _onEscKeyed: function onEscKeyed() { this.close(); }, _onUpKeyed: function onUpKeyed() { this.moveCursor(-1); }, _onDownKeyed: function onDownKeyed() { this.moveCursor(+1); }, _onLeftKeyed: function onLeftKeyed() { if (this.dir === “rtl” && this.input.isCursorAtEnd()) { this.autocomplete(this.menu.getActiveSelectable() || this.menu.getTopSelectable()); } }, _onRightKeyed: function onRightKeyed() { if (this.dir === “ltr” && this.input.isCursorAtEnd()) { this.autocomplete(this.menu.getActiveSelectable() || this.menu.getTopSelectable()); } }, _onQueryChanged: function onQueryChanged(e, query) { this._minLengthMet(query) ? this.menu.update(query) : this.menu.empty(); }, _onWhitespaceChanged: function onWhitespaceChanged() { this._updateHint(); }, _onLangDirChanged: function onLangDirChanged(e, dir) { if (this.dir !== dir) { this.dir = dir; this.menu.setLanguageDirection(dir); } }, _openIfActive: function openIfActive() { this.isActive() && this.open(); }, _minLengthMet: function minLengthMet(query) { query = _.isString(query) ? query : this.input.getQuery() || “”; return query.length >= this.minLength; }, _updateHint: function updateHint() { var $selectable, data, val, query, escapedQuery, frontMatchRegEx, match; $selectable = this.menu.getTopSelectable(); data = this.menu.getSelectableData($selectable); val = this.input.getInputValue(); if (data && !.isBlankString(val) && !this.input.hasOverflow()) { query = Input.normalizeQuery(val); escapedQuery = .escapeRegExChars(query); frontMatchRegEx = new RegExp(“^(?:” + escapedQuery + “)(.+$)”, “i”); match = frontMatchRegEx.exec(data.val); match && this.input.setHint(val + match[1]); } else { this.input.clearHint(); } }, isEnabled: function isEnabled() { return this.enabled; }, enable: function enable() { this.enabled = true; }, disable: function disable() { this.enabled = false; }, isActive: function isActive() { return this.active; }, activate: function activate() { if (this.isActive()) { return true; } else if (!this.isEnabled() || this.eventBus.before(“active”)) { return false; } else { this.active = true; this.eventBus.trigger(“active”); return true; } }, deactivate: function deactivate() { if (!this.isActive()) { return true; } else if (this.eventBus.before(“idle”)) { return false; } else { this.active = false; this.close(); this.eventBus.trigger(“idle”); return true; } }, isOpen: function isOpen() { return this.menu.isOpen(); }, open: function open() { if (!this.isOpen() && !this.eventBus.before(“open”)) { this.menu.open(); this._updateHint(); this.eventBus.trigger(“open”); } return this.isOpen(); }, close: function close() { if (this.isOpen() && !this.eventBus.before(“close”)) { this.menu.close(); this.input.clearHint(); this.input.resetInputValue(); this.eventBus.trigger(“close”); } return !this.isOpen(); }, setVal: function setVal(val) { this.input.setQuery(.toStr(val)); }, getVal: function getVal() { return this.input.getQuery(); }, select: function select($selectable) { var data = this.menu.getSelectableData($selectable); if (data && !this.eventBus.before(“select”, data.obj)) { this.input.setQuery(data.val, true); this.eventBus.trigger(“select”, data.obj); this.close(); return true; } return false; }, autocomplete: function autocomplete($selectable) { var query, data, isValid; query = this.input.getQuery(); data = this.menu.getSelectableData($selectable); isValid = data && query !== data.val; if (isValid && !this.eventBus.before(“autocomplete”, data.obj)) { this.input.setQuery(data.val); this.eventBus.trigger(“autocomplete”, data.obj); return true; } return false; }, moveCursor: function moveCursor(delta) { var query, $candidate, data, payload, cancelMove; query = this.input.getQuery(); $candidate = this.menu.selectableRelativeToCursor(delta); data = this.menu.getSelectableData($candidate); payload = data ? data.obj : null; cancelMove = this.minLengthMet() && this.menu.update(query); if (!cancelMove && !this.eventBus.before(“cursorchange”, payload)) { this.menu.setCursor($candidate); if (data) { this.input.setInputValue(data.val); } else { this.input.resetInputValue(); this._updateHint(); } this.eventBus.trigger(“cursorchange”, payload); return true; } return false; }, destroy: function destroy() { this.input.destroy(); this.menu.destroy(); } }); return Typeahead; function c(ctx) { var methods = [].slice.call(arguments, 1); return function() { var args = [].slice.call(arguments); _.each(methods, function(method) { return ctx[method].apply(ctx, args); }); }; } }(); (function() { “use strict”; var old, keys, methods; old = $.fn.typeahead; keys = { www: “tt-www”, attrs: “tt-attrs”, typeahead: “tt-typeahead” }; methods = { initialize: function initialize(o, datasets) { var www; datasets = _.isArray(datasets) ? datasets : [].slice.call(arguments, 1); o = o || {}; www = WWW(o.classNames); return this.each(attach); function attach() { var $input, $wrapper, $hint, $menu, defaultHint, defaultMenu, eventBus, input, menu, typeahead, MenuConstructor; _.each(datasets, function(d) { d.highlight = !!o.highlight; }); $input = $(this); $wrapper = $(www.html.wrapper); $hint = $elOrNull(o.hint); $menu = $elOrNull(o.menu); defaultHint = o.hint !== false && !$hint; defaultMenu = o.menu !== false && !$menu; defaultHint && ($hint = buildHintFromInput($input, www)); defaultMenu && ($menu = $(www.html.menu).css(www.css.menu)); $hint && $hint.val(“”); $input = prepInput($input, www); if (defaultHint || defaultMenu) { $wrapper.css(www.css.wrapper); $input.css(defaultHint ? www.css.input : www.css.inputWithNoHint); $input.wrap($wrapper).parent().prepend(defaultHint ? $hint : null).append(defaultMenu ? $menu : null); } MenuConstructor = defaultMenu ? DefaultMenu : Menu; eventBus = new EventBus({ el: $input }); input = new Input({ hint: $hint, input: $input }, www); menu = new MenuConstructor({ node: $menu, datasets: datasets }, www); typeahead = new Typeahead({ input: input, menu: menu, eventBus: eventBus, minLength: o.minLength }, www); $input.data(keys.www, www); $input.data(keys.typeahead, typeahead); } }, isEnabled: function isEnabled() { var enabled; ttEach(this.first(), function(t) { enabled = t.isEnabled(); }); return enabled; }, enable: function enable() { ttEach(this, function(t) { t.enable(); }); return this; }, disable: function disable() { ttEach(this, function(t) { t.disable(); }); return this; }, isActive: function isActive() { var active; ttEach(this.first(), function(t) { active = t.isActive(); }); return active; }, activate: function activate() { ttEach(this, function(t) { t.activate(); }); return this; }, deactivate: function deactivate() { ttEach(this, function(t) { t.deactivate(); }); return this; }, isOpen: function isOpen() { var open; ttEach(this.first(), function(t) { open = t.isOpen(); }); return open; }, open: function open() { ttEach(this, function(t) { t.open(); }); return this; }, close: function close() { ttEach(this, function(t) { t.close(); }); return this; }, select: function select(el) { var success = false, $el = $(el); ttEach(this.first(), function(t) { success = t.select($el); }); return success; }, autocomplete: function autocomplete(el) { var success = false, $el = $(el); ttEach(this.first(), function(t) { success = t.autocomplete($el); }); return success; }, moveCursor: function moveCursoe(delta) { var success = false; ttEach(this.first(), function(t) { success = t.moveCursor(delta); }); return success; }, val: function val(newVal) { var query; if (!arguments.length) { ttEach(this.first(), function(t) { query = t.getVal(); }); return query; } else { ttEach(this, function(t) { t.setVal(.toStr(newVal)); }); return this; } }, destroy: function destroy() { ttEach(this, function(typeahead, $input) { revert($input); typeahead.destroy(); }); return this; } }; $.fn.typeahead = function(method) { if (methods[method]) { return methods[method].apply(this, [].slice.call(arguments, 1)); } else { return methods.initialize.apply(this, arguments); } }; $.fn.typeahead.noConflict = function noConflict() { $.fn.typeahead = old; return this; }; function ttEach($els, fn) { $els.each(function() { var $input = $(this), typeahead; (typeahead = $input.data(keys.typeahead)) && fn(typeahead, $input); }); } function buildHintFromInput($input, www) { return $input.clone().addClass(www.classes.hint).removeData().css(www.css.hint).css(getBackgroundStyles($input)).prop(“readonly”, true).removeAttr(“id name placeholder required”).attr({ autocomplete: “off”, spellcheck: “false”, tabindex: -1 }); } function prepInput($input, www) { $input.data(keys.attrs, { dir: $input.attr(“dir”), autocomplete: $input.attr(“autocomplete”), spellcheck: $input.attr(“spellcheck”), style: $input.attr(“style”) }); $input.addClass(www.classes.input).attr({ autocomplete: “off”, spellcheck: false }); try { !$input.attr(“dir”) && $input.attr(“dir”, “auto”); } catch (e) {} return $input; } function getBackgroundStyles($el) { return { backgroundAttachment: $el.css(“background-attachment”), backgroundClip: $el.css(“background-clip”), backgroundColor: $el.css(“background-color”), backgroundImage: $el.css(“background-image”), backgroundOrigin: $el.css(“background-origin”), backgroundPosition: $el.css(“background-position”), backgroundRepeat: $el.css(“background-repeat”), backgroundSize: $el.css(“background-size”) }; } function revert($input) { var www, $wrapper; www = $input.data(keys.www); $wrapper = $input.parent().filter(www.selectors.wrapper); _.each($input.data(keys.attrs), function(val, key) { _.isUndefined(val) ? $input.removeAttr(key) : $input.attr(key, val); }); $input.removeData(keys.typeahead).removeData(keys.www).removeData(keys.attr).removeClass(www.classes.input); if ($wrapper.length) { $input.detach().insertAfter($wrapper); $wrapper.remove(); } } function $elOrNull(obj) { var isValid, $el; isValid = _.isJQuery(obj) || _.isElement(obj); $el = isValid ? $(obj).first() : []; return $el.length ? $el : null; } })(); }); n’ + ‘

NOVATEn’ + ‘

Mediaworldn’ + ‘

Via del Sacco Pieno di Pietre Levigate a Mano, 23n’ + ‘

Sassari Bed Breakfast la qualità al giusto prezzo " Vicino Ospedale Civile " Sassari

Bagno in camera - TV - Internet - aria condizionata - frigo - Sala colazioni

Tel +39 079 097 6223 Vicino Ospedale Civile Sassari

NOVATE MILANESE (MI)n’ + ‘

02 931711n’ + ‘ n’ + ‘

n’ + ‘

n’ + ‘

n’ + ‘

n’ + ‘

Lunn’ + ‘ Mar-Venn’ + ‘ Sab-Domn’ + ‘ n’ + ‘

Sassari Bed Breakfast la qualità al giusto prezzo " Vicino Ospedale Civile " Sassari

Bagno in camera - TV - Internet - aria condizionata - frigo - Sala colazioni

Tel +39 079 097 6223 Vicino Ospedale Civile Sassari

10-13n’ + ‘ 10-13n’ + ‘ chiuson’ + ‘ n’ + ‘

chiuson’ + ‘ 15-18n’ + ‘ chiuson’ + ‘ n’ + ‘ n’ + ‘

4 volantini attivin’ + ‘n’ + ‘n’ + ‘ ▲n’ + ‘ n’ + ‘ n’ + ‘ n’ + ‘ n’ + ‘ n’ + ‘ n’ + ‘ n’ + ‘ n’ + ‘

Voglio un mondo di tecnologian’ + ‘ n’ + ‘ n’ + ‘ n’ + ‘ n’ + ‘ n’ + ‘ n’ + ‘ n’ + ‘ n’ + ‘ n’ + ‘ n’ + ‘ n’ + ‘ n’ + ‘ n’ + ‘ n’ + ‘ n’ + ‘ ]]>

n’ + ‘ n’ + ” // Pointers var shop_info_el = info_window_el.querySelector(‘vf-shop-info’) var leaflets_el = info_window_el.querySelector(‘vf-leaflets’) var leaflets_browser_el = info_window_el.querySelector(‘vf-leaflets-browser’) var up = info_window_el.querySelector(‘a[href=”#up”]’) var down = info_window_el.querySelector(‘a[href=”#down”]’) var leaflet_idx var leaflets_no up.onclick = function ( e ) { if ( leaflet_idx > 0 ) { –leaflet_idx leaflets_el.setAttribute(‘data-slot’, leaflet_idx) } else { //console.warn(‘reached the top…’) //this.classList.add(‘disabled’) } if ( e ) e.preventDefault() return false } down.onclick = function ( e ) { if ( leaflet_idx + 1 ‘ + parsed + ” + ‘

‘ + ‘

‘ + ‘

‘ + ‘

Sassari Bed Breakfast la qualità al giusto prezzo " Vicino Ospedale Civile " Sassari

Bagno in camera - TV - Internet - aria condizionata - frigo - Sala colazioni

Tel +39 079 097 6223 Vicino Ospedale Civile Sassari

‘ + ‘

‘ + ‘

‘ + ‘

‘ + ‘

‘ + ‘

‘ + ‘

‘ + ‘

‘ + ‘

‘ + ‘

‘ + ‘

Sassari Bed Breakfast la qualità al giusto prezzo " Vicino Ospedale Civile " Sassari

Bagno in camera - TV - Internet - aria condizionata - frigo - Sala colazioni

Tel +39 079 097 6223 Vicino Ospedale Civile Sassari

‘ + ‘

‘ + ‘

‘ + ‘

Lun Mar-Ven Sab-Dom
10-13 10-13 chiuso
chiuso 15-18 chiuso

‘ } function goToPvLog(log) { //console.log(log); ga(‘send’, ‘event’, ‘Apertura itinerario Google Maps’, ‘Click’, log); } // returns html string function generateShopInfo ( shop ) { console.log(“shop %o”,shop) // Data about catena is in: // k.app.data.catena var shop_google_dest = ‘https://maps.google.com/maps?daddr=’ + shop.address.replace(new RegExp(” “, ‘g’), “+”) + “+” + shop.city.name.replace(new RegExp(” “, ‘g’), “+”) + “+” + shop.city.zipcode var logo = “https://data.volantinofacile.it/” + vf.app.gmap.data.catena.logo.replace(“:FORMAT”, “thumb”); //console.warn( vf.app.gmap.data.catena.pin ) var html = ‘‘ + ‘

‘ + vf.app.gmap.data.catena.name + ” – ” + shop.city.name + ‘

‘ //+ ‘

‘ + shop.insegna_pv + ‘

‘ + ‘

‘ + shop.address + ‘

‘ + ‘

Sassari Bed Breakfast la qualità al giusto prezzo " Vicino Ospedale Civile " Sassari

Bagno in camera - TV - Internet - aria condizionata - frigo - Sala colazioni

Tel +39 079 097 6223 Vicino Ospedale Civile Sassari

‘ + shop.city.name //+ ‘ (‘ + shop.sigla_pro + ‘)

‘ + ‘

‘ + shop.phone + ‘

‘ //+ ‘

‘ + ( shop.orari_pv || ‘ND’ ) + ‘

‘ //+ generateTimeTable( shop.orari_pv ) + ‘Vai al Negozio
‘ return html //” + JSON.stringify( pv_data, null, 3 ) + ” } // Data passed to this function is the pv.data attached to the marker. function updateInfoWindow ( data ) { console.log(“updateInfoWindow”); var shop_info_html = generateShopInfo( data ) shop_info_el.innerHTML = shop_info_html //var leaflets_html = generateLeaflets( leaflets_filtered ) //leaflets_el.innerHTML = leaflets_html // Reset. leaflet_idx = 0 leaflets_no = 0 leaflets_el.setAttribute( ‘data-slot’, leaflet_idx ) // Start the slideshow (only if we have more than one leaflet to show) if ( leaflets_no > 1 ) { slideshow_handle = setTimeout( doSlide, FREQUENCY ) } switch ( leaflets_no ) { case 0: // Hide the whole vf-leaflets-browser info_window_el.className = ‘none’ break case 1: // Hide the ▲ and ▼ anchors info_window_el.className = ‘no-slide’ break default: info_window_el.className = ” } } // http://stackoverflow.com/a/13274361 /* function getBoundsZoomLevel(bounds, mapDim) { var WORLD_DIM = { height: 256, width: 256 }; var ZOOM_MAX = 21; function latRad(lat) { var sin = Math.sin(lat * Math.PI / 180); var radX2 = Math.log((1 + sin) / (1 – sin)) / 2; return Math.max(Math.min(radX2, Math.PI), -Math.PI) / 2; } function zoom(mapPx, worldPx, fraction) { return Math.floor(Math.log(mapPx / worldPx / fraction) / Math.LN2); } var ne = bounds.getNorthEast(); var sw = bounds.getSouthWest(); var latFraction = (latRad(ne.lat()) – latRad(sw.lat())) / Math.PI; var lngDiff = ne.lng() – sw.lng(); var lngFraction = ((lngDiff slideshow timer’) clearTimeout( slideshow_handle ) // Close it. info_window.close() // Rewrite history //window.history.replaceState( null, ”, location.pathname + location.search + ‘#mappa’ ) // Buggish per ora. da semplificare } gmap.closeInfoWindow = closeInfoWindow //! Fires also when the info_window is not visualized google.maps.event.addListener( info_window, ‘content_changed’, function () { //console.warn( ‘the infoWindow content did change’ ) }) //! Do not use to update the content. google.maps.event.addListener( info_window, ‘domready’, function () { //console.warn( “the info_window’s DOM is ready! (executed each time the info_window is displayed)” ) }) //! This event is not triggered when I programmatically close the infowindow. google.maps.event.addListener( info_window, ‘closeclick’, function () { //console.warn(‘closeclick’) // Invoke the cleanup routine. closeInfoWindow() // window.history.replaceState( null, ”, location.pathname + location.search + ‘#mappa’ ) }) // Inline everything here. // ×) preload the icons. injekt them instead. // 2) generate the markers marker_bounds = new google.maps.LatLngBounds() //markers = data.puntivendita.map( function ( pv, i ) vf.app.gmap.data.puntivendita.forEach( function ( pv, i ) { var latlng var marker latlng = new google.maps.LatLng( +pv.latitude, +pv.longitude ) marker_bounds.extend( latlng ) marker = new google.maps.Marker( { position: latlng, //icon: icons[ 0 ], // current_icon_size_idx // getMarkerImageSuffix( gmap.ZOOM_INITIAL )], title: pv.name, // The z-index will have to change on roll-over zIndex: i }) // Store the information of the pv directly into the marker. // Still missing the details about the “volantini” to be shown in the infoWindow marker.data = pv // Setup some listener on the marker google.maps.event.addListener( marker, ‘click’, function () { // Close the infowindow if already opened. if ( info_window.map === map ) { //info_window.close() closeInfoWindow() } //console.log( JSON.stringify( this.data, null, 3 )) //!neu! center the map on the marker before… //map.setCenter( this.position ) // No way. innatural. // Update the content of the info_window updateInfoWindow( this.data ) // Present the info_window. info_window.open( map, this ) //console.log(vf.app.gmap.data) var log = ‘Click sul punto vendita ID: ‘ + pv.id +’, Nome: ‘ + pv.name + ‘, Catena: ‘ + vf.app.gmap.data.catena.name; //+ ‘, Provincia: ‘ + vf.app.gmap.data.provincia.nome_pro; //console.log(log); ga(‘send’, ‘event’, ‘Apertura mappa su punto vendita’, ‘Click’, log); // rewrite history window.history.replaceState( null, ”, location.pathname + location.search + ‘#mappa-‘ + pv.id ) }) // Make it front-most on rollover, only if the info_window is not visualized. google.maps.event.addListener( marker, ‘mouseover’, function () { if ( info_window.map == null ) marker.setZIndex( markers.length ) }) //return marker markers.push( marker ) }) //return marker // 3) extend bounds // 4) initialize map using the center of the bounds. map_center = marker_bounds.getCenter() mapOptions = { zoom: 8, center: map_center, scrollwheel: true, // https://developers.google.com/maps/documentation/javascript/controls //disableDefaultUI: false, panControl: false, zoomControl: true, zoomControlOptions: { style: google.maps.ZoomControlStyle.LARGE, position: google.maps.ControlPosition.LEFT_CENTER }, mapTypeControl: false, // Per ora, visto che il cambio di posizione è buggy… scaleControl: true, streetViewControl: false, overviewMapControl: false } // Better to alias locally also. // Questo va fatto alla fine, dopo aver piazzato i marker. map = gmap.map = new google.maps.Map( gmap.el, mapOptions ) console.log(‘new google maps’) //last_zoom_id = getIconIdx( gmap.ZOOM_INITIAL ) // Process each marker ad assign to the map markers.forEach( function ( marker ) { marker.setMap( map ) marker.setIcon( “https://data.volantinofacile.it/” + vf.app.gmap.data.catena.logo.replace(“:FORMAT”, “pin”) ) }) // marker Tu sei qui var latlng var whereIAm var vfLocation = decodeURIComponent(getCookie(“vf_location”)); if (vfLocation) { var locationCookie = JSON.parse(vfLocation); latlng = new google.maps.LatLng(+locationCookie.lat , +locationCookie.lng) marker_bounds.extend( latlng ) whereIAm = new google.maps.Marker( { position: latlng, icon: null, title: “Tu sei qui!”, zIndex: markers.length + 1 }) var infoWhere = new google.maps.InfoWindow({ content: ‘Tu sei qui!’ }) google.maps.event.addListener( whereIAm, ‘click’, function () { // Close the infowindow if already opened. if ( info_window.map === map ) { closeInfoWindow() } infoWhere.open( map, this ) }) // Make it front-most on rollover, only if the info_window is not visualized. google.maps.event.addListener( whereIAm, ‘mouseover’, function () { if ( infoWhere.map == null ) whereIAm.setZIndex( markers.length + 1 ) }) whereIAm.setIcon(null) whereIAm.setMap(map) } //markers.push( whereIAm ) console.warn(‘BEFORE FITBOUNDS’) map.fitBounds( marker_bounds ) console.warn(‘JUST AFTER FITBOUNDS’) JUST_INITIALIZED = true // Close the infoWindow if it is open when clicking on the map. google.maps.event.addListener( map, ‘click’, function () { if ( info_window.map == null ) { //console.warn(‘not open’) } else { closeInfoWindow() window.history.replaceState( null, ”, location.pathname + location.search + ‘#mappa’ ) } }) // Do something only the first time the map is loaded google.maps.event.addListenerOnce( map, ‘idle’, function() { gmap.container.setAttribute( ‘data-zoom’, 14 ) last_center = map.getCenter() }) // Too costly. do it on “idle” google.maps.event.addListener( map, ‘idle’, function() { //console.warn( Date.now(), ‘updating last known center’ ) last_center = map.getCenter() }) // Is this really necessary? window.addEventListener( ‘resize’, function () { google.maps.event.trigger( map, ‘resize’ ) // Lock position on resize to the last known center… map.setCenter( last_center ) } , false ) // √ Done (hopefully) gmap.INITIALIZED = true // ! call the callback if set if ( cb ) { cb() cb = null } } // Async script loading function loadScript() { var script = document.createElement(‘script’) script.type = ‘text/javascript’ script.src = ‘https://maps.googleapis.com/maps/api/js?v=3.exp’ + ‘&callback=initializeGoogleMaps&key=AIzaSyABlhIDEeZ-GiU9XfFYcQMAcePg1LCz0qQ’ document.body.appendChild( script ) } // Lazy initialization… (script callback) // Definiamolo global con nome randomico e cancelliamolo subito dopo creazione. console.warn(‘Random callback name:’, (+Math.random().toFixed( 16 ).slice( 2 )).toString(16) ) // function initializeGoogleMaps() { if ( gmap.INITIALIZED ) { //console.warn( ‘(initializeGoogleMaps) Google Maps already initialized’ ) return } // Preload the icons and initialize the map. preloadMarkerIcons( initializeMap ) // Mark it as initialized //gmap.INITIALIZED = true } gmap.initialize = function( cb ) { if ( gmap.INITIALIZED ) { //console.warn( ‘(initializeGoogleMapsLazy) Google Maps already initialized’ ) cb && cb() return } cb = cb loadScript() } gmap.gotoPuntoVendita = function ( pv ) { // Find the marker. var marker = markers.filter( function ( marker ) { return marker.data === pv })[0] // Center the map on the marker… map.setCenter( marker.position ) //console.warn( marker.position ) // mi sembra che tanto a prima botta non funziona. verifichiamo se dopo si. // Si. serve. e serve farlo anche nel click però… // No. troppo strano a farlo in quel modo… //setTimeout( function (){ // Open the infowindow. google.maps.event.trigger( marker, ‘click’ ) //} //, 0 ) } // Invoked from the ctrl when closing via the logo/close gmap.close = function () { gmap.closeInfoWindow() } gmap.markers = markers vf.app.gmap = gmap

Source

L’articolo Offerte Lavastoviglie Unieuro con prezzi proviene da #Adessonews B&B Bed and Breakfast Tel +39 079 097 6223 vicino Ospedale Civile Sassari Copenaghen House “La qualità al miglior prezzo”.

Sassari Bed Breakfast la qualità al giusto prezzo " Vicino Ospedale Civile " Sassari

Tel +39 079 097 6223 Vicino Ospedale Civile Sassari

La rete Adessonews è un aggregatore di news e replica gli articoli senza fini di lucro ma con finalità di critica, discussione od insegnamento,

come previsto dall’art. 70 legge sul diritto d’autore e art. 41 della costituzione Italiana. Al termine di ciascun articolo è indicata la provenienza dell'articolo.

Per richiedere la rimozione dell'articolo clicca qui

Open chat
1
Ciao posso aiutarti?
B&B Sardegna La qualità al miglior prezzo.
Utilizza questo pulsante per informazioni o prenotare, abbiamo riservato per te uno sconto.
%d blogger hanno fatto clic su Mi Piace per questo: