Search in sources :

Example 1 with CircleMapObject

use of com.yandex.mapkit.map.CircleMapObject in project react-native-yamap by volga-volga.

the class YamapView method updateUserLocationIcon.

private void updateUserLocationIcon() {
    if (userLocationView != null) {
        PlacemarkMapObject pin = userLocationView.getPin();
        PlacemarkMapObject arrow = userLocationView.getArrow();
        if (userLocationBitmap != null) {
            pin.setIcon(ImageProvider.fromBitmap(userLocationBitmap));
            arrow.setIcon(ImageProvider.fromBitmap(userLocationBitmap));
        }
        CircleMapObject circle = userLocationView.getAccuracyCircle();
        if (userLocationAccuracyFillColor != 0) {
            circle.setFillColor(userLocationAccuracyFillColor);
        }
        if (userLocationAccuracyStrokeColor != 0) {
            circle.setStrokeColor(userLocationAccuracyStrokeColor);
        }
        circle.setStrokeWidth(userLocationAccuracyStrokeWidth);
    }
}
Also used : CircleMapObject(com.yandex.mapkit.map.CircleMapObject) PlacemarkMapObject(com.yandex.mapkit.map.PlacemarkMapObject)

Example 2 with CircleMapObject

use of com.yandex.mapkit.map.CircleMapObject in project react-native-yamap by volga-volga.

the class YamapView method addFeature.

// children
public void addFeature(View child, int index) {
    if (child instanceof YamapPolygon) {
        YamapPolygon _child = (YamapPolygon) child;
        PolygonMapObject obj = getMap().getMapObjects().addPolygon(_child.polygon);
        _child.setMapObject(obj);
        childs.add(_child);
    } else if (child instanceof YamapPolyline) {
        YamapPolyline _child = (YamapPolyline) child;
        PolylineMapObject obj = getMap().getMapObjects().addPolyline(_child.polyline);
        _child.setMapObject(obj);
        childs.add(_child);
    } else if (child instanceof YamapMarker) {
        YamapMarker _child = (YamapMarker) child;
        PlacemarkMapObject obj = getMap().getMapObjects().addPlacemark(_child.point);
        _child.setMapObject(obj);
        childs.add(_child);
    } else if (child instanceof YamapCircle) {
        YamapCircle _child = (YamapCircle) child;
        CircleMapObject obj = getMap().getMapObjects().addCircle(_child.circle, 0, 0.f, 0);
        _child.setMapObject(obj);
        childs.add(_child);
    }
}
Also used : PolygonMapObject(com.yandex.mapkit.map.PolygonMapObject) CircleMapObject(com.yandex.mapkit.map.CircleMapObject) PolylineMapObject(com.yandex.mapkit.map.PolylineMapObject) PlacemarkMapObject(com.yandex.mapkit.map.PlacemarkMapObject)

Aggregations

CircleMapObject (com.yandex.mapkit.map.CircleMapObject)2 PlacemarkMapObject (com.yandex.mapkit.map.PlacemarkMapObject)2 PolygonMapObject (com.yandex.mapkit.map.PolygonMapObject)1 PolylineMapObject (com.yandex.mapkit.map.PolylineMapObject)1