Open mvpk-x opened 2 months ago
на ios тоже не работает нажатие на маркер😔 "react-native-yamap": "^4.6.0", сделал костыль - работает через раз, т.к точность 1:100 точек в функции onMapPress
const pLat = e.nativeEvent.lat;
const pLon = e.nativeEvent.lon;
// вычисление погрешности при нажатии на карту и сравнивание с координатами активности(Math.abs(pLon - activity.location.coordinates.longitude) >= 0.001));
const item = activities.find(activity => {
const dep = Math.abs(pLat - activity.location.coordinates.latitude) >= 0.001;
const depLon = Math.abs(pLon - activity.location.coordinates.longitude) >= 0.001;Math.abs(pLon -
activity.location.coordinates.longitude), depLon);
if (!dep && !depLon) {
return activity;
}
});
if (!!item) {
onPresItem(item);
}
на ios тоже не работает нажатие на маркер😔 "react-native-yamap": "^4.6.0", сделал костыль - работает через раз, т.к точность 1:100 точек в функции onMapPress
const pLat = e.nativeEvent.lat; const pLon = e.nativeEvent.lon; // вычисление погрешности при нажатии на карту и сравнивание с координатами активности(Math.abs(pLon - activity.location.coordinates.longitude) >= 0.001)); const item = activities.find(activity => { const dep = Math.abs(pLat - activity.location.coordinates.latitude) >= 0.001; const depLon = Math.abs(pLon - activity.location.coordinates.longitude) >= 0.001;Math.abs(pLon - activity.location.coordinates.longitude), depLon); if (!dep && !depLon) { return activity; } }); if (!!item) { onPresItem(item); }
На iOS работает нажатие на маркер
На iOS не проверял.