Préparez-vous à rencontrer des femmes dans votre région

Préparez-vous à rencontrer des femmes dans votre région


idates.com

Des rencontres exceptionnelles en un seul clic

  • 1 / 5
  • 2 / 5
  • 3 / 5
  • 4 / 5
  • 5 / 5

= 7680 ? ‘k8’ : (mapSize[0] >= 3480 ? ‘k4’ : ‘normal’); document.getElementById(‘map’).classList.add(‘mode-‘ + mode); const mapOpts = { zoomLevels: { normal: [11, 12, 13], k4: [13, 14, 15], k8: [14, 15, 16] }, iniZoom: { normal: 13, k4: 15, k8: 16 }, girlsLoadByZoomDefault: [12, 13, 15], iniLocation: [‘48.8582’, ‘2.3387’].map(p => 1 * p), fallbackLocation: [49.583332, 11.016667], tileSize: { normal: 512, k4: 1024, k8: 2048 }, zoomOffset: { normal: -1, k4: -2, k8: -3 }, iconSize: { normal: [60, 60], k4: [120, 120], k8: [240, 240] }, shadowSize: { normal: [‘auto’, 120], k4: [‘auto’, 240], k8: [‘auto’, 480] }, shadowOffset: { normal: {top: 11, left: 13}, k4: {top: 22, left: 27}, k8: {top: 44, left: 54} }, tooltipClassName: { normal: ‘mytt-container’, k4: ‘mytt-container-4k’, k8: ‘mytt-container-8k’, } }; let girlsLoadByZoom = null; if (girlsLoadByZoom == null) { girlsLoadByZoom = mapOpts.girlsLoadByZoomDefault; } else { girlsLoadByZoom = girlsLoadByZoom.reverse() } girlsLoadByZoom = Object.assign.apply({}, mapOpts.zoomLevels[mode].map((v, i) => ({[v]: girlsLoadByZoom[i]}))); let bounds = {}, zoom, leftZoom, markers = []; let iniLocation = mapOpts.iniLocation; if (iniLocation[0] == 0 || iniLocation[1] == 0) { iniLocation = mapOpts.fallbackLocation; } let mymap = L.map(‘map’).setView(iniLocation, mapOpts.iniZoom[mode]); let MarkerPatern = L.DivIcon.extend({ options: { iconAnchor: [mapOpts.iconSize[mode][0]/2 + 13, mapOpts.iconSize[mode][1]/2 + 89], iconSize: mapOpts.iconSize, className: ‘marker-patern’, tooltipAnchor: [0, -80] } }) //Add black cover let bound = mymap.getBounds(); let blackCover = L.marker([bound.getNorth(), bound.getWest()], {icon: L.divIcon({className: ‘black-cover’})}).addTo(mymap); mymap.on(‘zoom’, function(e) { if (typeof girlsLoadByZoom[mymap.getZoom()] != ‘undefined’ && (mymap.getZoom() < zoom || typeof zoom == 'undefined')) { loadMarkers(); } }); mymap.on('viewreset', function() { let newLocation = mymap.getCenter(); let latOffset = newLocation.lat - iniLocation[0]; let longOffset = newLocation.lng - iniLocation[1]; let bound = mymap.getBounds(); for (let i = 0; i < markers.length; i ++ ) { let latLng = markers[i].getLatLng(); markers[i].setLatLng(getRandomePointInArea(bound)) } blackCover.setLatLng([blackCover.getLatLng().lat + latOffset, blackCover.getLatLng().lng + longOffset]) }) mymap.on('resize', function(e) { let bound = mymap.getBounds(); mapSize[0] = e.newSize.x, mapSize[1] = e.newSize.y; let oldIdx = blackCover.getElement().style['z-index']; blackCover.setLatLng([bound.getNorth(), bound.getWest()]).getElement().style.cssText += 'z-index: ' + oldIdx + ';width:' + mapSize[0] + 'px;height:' + mapSize[1] + 'px'; }); L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { attribution: 'Map data © OpenStreetMap contributors, Imagery © Mapbox’ }).addTo(mymap); mymap.locate({setView: true, maxZoom: mapOpts.iniZoom[mode]}); loadMarkers(); function getRandomePointInArea(bound, excludedBound) { let x, y, height = bound.getNorth() – bound.getSouth(), width = bound.getEast() – bound.getWest(); do { x = height * 0.8 * Math.random() + bound.getSouth() + height * 0.1; } while (excludedBound && (x > excludedBound.getNorth() || x < excludedBound.getSouth())); do { y = width * 0.9 * Math.random() + bound.getWest() + width * 0.05; } while (excludedBound && (y excludedBound.getEast())); return [x, y]; } function getToolTipDirection(point, bound) { let height = bound.getNorth() - bound.getSouth() return point[0] >= height * 0.8 + bound.getSouth() ? ‘bottom’ : (point[0] <= height * 0.1 + bound.getSouth() ? 'top' : 'auto'); } function loadMarkers() { zoom = mymap.getZoom(); let bound = mymap.getBounds(), excludedBound = bounds[zoom]; bounds[zoom] = bound; let girls = listGirls.filter(function(girl) { return typeof girl.loaded == 'undefined' }).sort(function() { return 0.5 - Math.random() }).slice(0, girlsLoadByZoom[mymap.getZoom()]); for (let i = 0; i < girls.length; i ++) { let pin = 'https://lpmedia.justservingfiles.net/img/_btns/marker_bg.png'; let icon = new MarkerPatern({html: '‘}); let point = getRandomePointInArea(bound, excludedBound); let marker = L.marker(getRandomePointInArea(bound, excludedBound), {icon: icon, riseOnHover: true, riseOffset: 10000}); marker.addTo(mymap) .bindTooltip( ‘

‘ + girls[i].nameAge +  », {opacity: 1, direction: getToolTipDirection(point, bound), className: ‘tooltip-fade-in’} ).on(‘mouseover’,function(e) { let bound = mymap.getBounds(); let idx = e.target.getElement().style.zIndex * 1 – 1; blackCover.setLatLng([bound.getNorth(), bound.getWest()]).getElement().style.cssText += ‘z-index: ‘ + idx + ‘;opacity:1;visibility:visible;width:’ + mapSize[0] + ‘px;height:’ + mapSize[1] + ‘px’; mymap.dragging.disable(); mymap.touchZoom.disable(); mymap.doubleClickZoom.disable(); mymap.scrollWheelZoom.disable(); mymap.boxZoom.disable(); mymap.keyboard.disable(); if (mymap.tap) { mymap.tap.disable(); } }).on(‘mouseout’,function(e) { blackCover.getElement().style.cssText = ‘opacity:0;visibility:hidden’; mymap.dragging.enable(); mymap.touchZoom.enable(); mymap.doubleClickZoom.enable(); mymap.scrollWheelZoom.enable(); mymap.boxZoom.enable(); mymap.keyboard.enable(); if (mymap.tap) { mymap.tap.enable(); } }); markers.push(marker) girls[i].loaded = true; } } ]]>



Source


Laisser un commentaire

Votre adresse e-mail ne sera pas publiée.