Are you an agent?
Learn how our low rates, reliability, and expertise can help you and your clients.
Refer a client
,
A PHP Error was encountered
Severity: Notice
Message: Undefined offset: 0
Filename: views/property.php
Line Number: 300
],
zoom: 11.15
});
map.on('load', () => {
map.addSource('places', {
'type': 'geojson',
'data': '//labs-estate.com/ajax/map/famagusta-industrial-area-north-cyprus'
});
// Add a layer showing the places.
map.addLayer({
'id': 'poi-labels',
'type': 'symbol',
'source': 'places',
'layout': {
'text-field': ['get', 'title'],
'text-variable-anchor': ['top', 'bottom', 'left', 'right'],
'text-radial-offset': 0.5,
'text-justify': 'auto'
}
});
map.addLayer({
'id': 'circle',
'type': 'circle',
'source': 'places',
'paint': {
'circle-color': '#4264fb',
'circle-radius': 8,
'circle-stroke-width': 2,
'circle-stroke-color': '#ffffff'
}
});
map.on('click', 'circle', (e) => {
// Copy coordinates array.
const coordinates = e.features[0].geometry.coordinates.slice();
const description = e.features[0].properties.description;
// Ensure that if the map is zoomed out such that multiple
// copies of the feature are visible, the popup appears
// over the copy being pointed to.
while (Math.abs(e.lngLat.lng - coordinates[0]) > 180) {
coordinates[0] += e.lngLat.lng > coordinates[0] ? 360 : -360;
}
new mapboxgl.Popup()
.setLngLat(coordinates)
.setHTML(description)
.addTo(map);
});
// Change the cursor to a pointer when the mouse is over the places layer.
map.on('mouseenter', 'places', () => {
map.getCanvas().style.cursor = 'pointer';
});
// Change it back to a pointer when it leaves.
map.on('mouseleave', 'places', () => {
map.getCanvas().style.cursor = '';
});
});