Answer the question
In order to leave comments, you need to log in
Yandex maps. How to filter by real estate objects?
There is a form where real estate is selected according to a set of parameters: type, area, price, area, etc. When the shape is changed, the map is redrawn accordingly with an already updated set of labels on it. Are there examples of such filters implementation? I already read about filtering objects , I'm interested in how to make a filter by an arbitrary set of characteristics.
Answer the question
In order to leave comments, you need to log in
var mapManager = new ymaps.ObjectManager({
clusterize: true,
gridSize: 32,
clusterDisableClickZoom: true
});
mapManager.objects.options.set('preset', 'islands#blackDotIcon');
mapManager.clusters.options.set('preset', 'islands#blackClusterIcons');
map.geoObjects.add(mapManager);
mapManager.removeAll();
let items = [];
items.push({
type: 'Feature',
id: data.id,
geometry: { type: 'Point', coordinates: [data.lat, data.lng] },
properties: {
clusterCaption: data.title,
hintContent: data.title,
balloonContentHeader: data.header,
balloonContentBody: data.description,
balloonContentFooter: data.footer,
yourProperty1: data.prop1,
yourProperty2: data.prop2
}
});
mapManager.add({ type: 'FeatureCollection', features: items });
mapManager.getMap().setBounds(
mapManager.getBounds(),
{ checkZoomRange: true, useMapMargin: true }
);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question