428 CppProxy.setDebugFlag(flag,
441 return CppProxy.getDebugFlag(flag);
446 private final long nativeRef;
447 private final AtomicBoolean destroyed =
new AtomicBoolean(
false);
449 private CppProxy(
long nativeRef)
451 if (nativeRef == 0)
throw new RuntimeException(
"nativeRef is zero");
452 this.nativeRef = nativeRef;
455 private native
void nativeDestroy(
long nativeRef);
456 public void _djinni_private_destroy()
458 boolean destroyed = this.destroyed.getAndSet(
true);
459 if (!destroyed) nativeDestroy(this.nativeRef);
461 protected void finalize() throws java.lang.Throwable
463 _djinni_private_destroy();
470 public void setSublocationId(
int id)
472 assert !this.destroyed.get() :
"trying to use a destroyed object";
473 native_setSublocationId(this.nativeRef,
id);
475 private native
void native_setSublocationId(
long _nativeRef,
int id);
478 public Point screenPositionToMeters(android.graphics.PointF point)
480 assert !this.destroyed.get() :
"trying to use a destroyed object";
481 return native_screenPositionToMeters(this.nativeRef, point);
483 private native Point native_screenPositionToMeters(
long _nativeRef, android.graphics.PointF point);
486 public android.graphics.PointF metersToScreenPosition(Point point,
boolean clipToViewport)
488 assert !this.destroyed.get() :
"trying to use a destroyed object";
489 return native_metersToScreenPosition(this.nativeRef, point, clipToViewport);
491 private native android.graphics.PointF native_metersToScreenPosition(
long _nativeRef, Point point,
boolean clipToViewport);
494 public CircleMapObject addCircleMapObject()
496 assert !this.destroyed.get() :
"trying to use a destroyed object";
497 return native_addCircleMapObject(this.nativeRef);
499 private native CircleMapObject native_addCircleMapObject(
long _nativeRef);
502 public boolean removeCircleMapObject(CircleMapObject circleMapObject)
504 assert !this.destroyed.get() :
"trying to use a destroyed object";
505 return native_removeCircleMapObject(this.nativeRef, circleMapObject);
507 private native
boolean native_removeCircleMapObject(
long _nativeRef, CircleMapObject circleMapObject);
510 public IconMapObject addIconMapObject()
512 assert !this.destroyed.get() :
"trying to use a destroyed object";
513 return native_addIconMapObject(this.nativeRef);
515 private native IconMapObject native_addIconMapObject(
long _nativeRef);
518 public boolean removeIconMapObject(IconMapObject iconMapObject)
520 assert !this.destroyed.get() :
"trying to use a destroyed object";
521 return native_removeIconMapObject(this.nativeRef, iconMapObject);
523 private native
boolean native_removeIconMapObject(
long _nativeRef, IconMapObject iconMapObject);
526 public PolygonMapObject addPolygonMapObject()
528 assert !this.destroyed.get() :
"trying to use a destroyed object";
529 return native_addPolygonMapObject(this.nativeRef);
531 private native PolygonMapObject native_addPolygonMapObject(
long _nativeRef);
534 public boolean removePolygonMapObject(PolygonMapObject polygonMapObject)
536 assert !this.destroyed.get() :
"trying to use a destroyed object";
537 return native_removePolygonMapObject(this.nativeRef, polygonMapObject);
539 private native
boolean native_removePolygonMapObject(
long _nativeRef, PolygonMapObject polygonMapObject);
542 public PolylineMapObject addPolylineMapObject()
544 assert !this.destroyed.get() :
"trying to use a destroyed object";
545 return native_addPolylineMapObject(this.nativeRef);
547 private native PolylineMapObject native_addPolylineMapObject(
long _nativeRef);
550 public boolean removePolylineMapObject(PolylineMapObject polylineMapObject)
552 assert !this.destroyed.get() :
"trying to use a destroyed object";
553 return native_removePolylineMapObject(this.nativeRef, polylineMapObject);
555 private native
boolean native_removePolylineMapObject(
long _nativeRef, PolylineMapObject polylineMapObject);
558 public DottedPolylineMapObject addDottedPolylineMapObject()
560 assert !this.destroyed.get() :
"trying to use a destroyed object";
561 return native_addDottedPolylineMapObject(this.nativeRef);
563 private native DottedPolylineMapObject native_addDottedPolylineMapObject(
long _nativeRef);
566 public boolean removeDottedPolylineMapObject(DottedPolylineMapObject dottedPolylineMapObject)
568 assert !this.destroyed.get() :
"trying to use a destroyed object";
569 return native_removeDottedPolylineMapObject(this.nativeRef, dottedPolylineMapObject);
571 private native
boolean native_removeDottedPolylineMapObject(
long _nativeRef, DottedPolylineMapObject dottedPolylineMapObject);
574 public void removeAllMapObjects()
576 assert !this.destroyed.get() :
"trying to use a destroyed object";
577 native_removeAllMapObjects(this.nativeRef);
579 private native
void native_removeAllMapObjects(
long _nativeRef);
582 public void pickMapObjectAt(android.graphics.PointF point)
584 assert !this.destroyed.get() :
"trying to use a destroyed object";
585 native_pickMapObjectAt(this.nativeRef, point);
587 private native
void native_pickMapObjectAt(
long _nativeRef, android.graphics.PointF point);
590 public void pickMapFeatureAt(android.graphics.PointF point)
592 assert !this.destroyed.get() :
"trying to use a destroyed object";
593 native_pickMapFeatureAt(this.nativeRef, point);
595 private native
void native_pickMapFeatureAt(
long _nativeRef, android.graphics.PointF point);
598 public void addPickListener(PickListener listener)
600 assert !this.destroyed.get() :
"trying to use a destroyed object";
601 native_addPickListener(this.nativeRef, listener);
603 private native
void native_addPickListener(
long _nativeRef, PickListener listener);
606 public void removePickListener(PickListener listener)
608 assert !this.destroyed.get() :
"trying to use a destroyed object";
609 native_removePickListener(this.nativeRef, listener);
611 private native
void native_removePickListener(
long _nativeRef, PickListener listener);
614 public void addInputListener(InputListener listener)
616 assert !this.destroyed.get() :
"trying to use a destroyed object";
617 native_addInputListener(this.nativeRef, listener);
619 private native
void native_addInputListener(
long _nativeRef, InputListener listener);
622 public void removeInputListener(InputListener listener)
624 assert !this.destroyed.get() :
"trying to use a destroyed object";
625 native_removeInputListener(this.nativeRef, listener);
627 private native
void native_removeInputListener(
long _nativeRef, InputListener listener);
630 public void addCameraListener(CameraListener listener)
632 assert !this.destroyed.get() :
"trying to use a destroyed object";
633 native_addCameraListener(this.nativeRef, listener);
635 private native
void native_addCameraListener(
long _nativeRef, CameraListener listener);
638 public void removeCameraListener(CameraListener listener)
640 assert !this.destroyed.get() :
"trying to use a destroyed object";
641 native_removeCameraListener(this.nativeRef, listener);
643 private native
void native_removeCameraListener(
long _nativeRef, CameraListener listener);
646 public void flyTo(Camera camera,
int duration, CameraCallback callback)
648 assert !this.destroyed.get() :
"trying to use a destroyed object";
649 native_flyTo(this.nativeRef, camera, duration, callback);
651 private native
void native_flyTo(
long _nativeRef, Camera camera,
int duration, CameraCallback callback);
654 public boolean selectMapFeature(String featureId)
656 assert !this.destroyed.get() :
"trying to use a destroyed object";
657 return native_selectMapFeature(this.nativeRef, featureId);
659 private native
boolean native_selectMapFeature(
long _nativeRef, String featureId);
662 public boolean deselectMapFeature(String featureId)
664 assert !this.destroyed.get() :
"trying to use a destroyed object";
665 return native_deselectMapFeature(this.nativeRef, featureId);
667 private native
boolean native_deselectMapFeature(
long _nativeRef, String featureId);
670 public void deselectAllMapFeatures()
672 assert !this.destroyed.get() :
"trying to use a destroyed object";
673 native_deselectAllMapFeatures(this.nativeRef);
675 private native
void native_deselectAllMapFeatures(
long _nativeRef);
678 public void applyFilter(String filter, String layer)
680 assert !this.destroyed.get() :
"trying to use a destroyed object";
681 native_applyFilter(this.nativeRef, filter, layer);
683 private native
void native_applyFilter(
long _nativeRef, String filter, String layer);
686 public void moveTo(Camera camera,
int duration, AnimationType animationType, CameraCallback callback)
688 assert !this.destroyed.get() :
"trying to use a destroyed object";
689 native_moveTo(this.nativeRef, camera, duration, animationType, callback);
691 private native
void native_moveTo(
long _nativeRef, Camera camera,
int duration, AnimationType animationType, CameraCallback callback);
694 public float getZoomFactor()
696 assert !this.destroyed.get() :
"trying to use a destroyed object";
697 return native_getZoomFactor(this.nativeRef);
699 private native
float native_getZoomFactor(
long _nativeRef);
702 public void setZoomFactor(
float newZoomFactor)
704 assert !this.destroyed.get() :
"trying to use a destroyed object";
705 native_setZoomFactor(this.nativeRef, newZoomFactor);
707 private native
void native_setZoomFactor(
long _nativeRef,
float newZoomFactor);
710 public float getMinZoomFactor()
712 assert !this.destroyed.get() :
"trying to use a destroyed object";
713 return native_getMinZoomFactor(this.nativeRef);
715 private native
float native_getMinZoomFactor(
long _nativeRef);
718 public void setMinZoomFactor(
float newMinZoomFactor)
720 assert !this.destroyed.get() :
"trying to use a destroyed object";
721 native_setMinZoomFactor(this.nativeRef, newMinZoomFactor);
723 private native
void native_setMinZoomFactor(
long _nativeRef,
float newMinZoomFactor);
726 public float getMaxZoomFactor()
728 assert !this.destroyed.get() :
"trying to use a destroyed object";
729 return native_getMaxZoomFactor(this.nativeRef);
731 private native
float native_getMaxZoomFactor(
long _nativeRef);
734 public void setMaxZoomFactor(
float newMaxZoomFactor)
736 assert !this.destroyed.get() :
"trying to use a destroyed object";
737 native_setMaxZoomFactor(this.nativeRef, newMaxZoomFactor);
739 private native
void native_setMaxZoomFactor(
long _nativeRef,
float newMaxZoomFactor);
742 public boolean getStickToBorder()
744 assert !this.destroyed.get() :
"trying to use a destroyed object";
745 return native_getStickToBorder(this.nativeRef);
747 private native
boolean native_getStickToBorder(
long _nativeRef);
750 public void setStickToBorder(
boolean newStickToBorder)
752 assert !this.destroyed.get() :
"trying to use a destroyed object";
753 native_setStickToBorder(this.nativeRef, newStickToBorder);
755 private native
void native_setStickToBorder(
long _nativeRef,
boolean newStickToBorder);
758 public Camera getCamera()
760 assert !this.destroyed.get() :
"trying to use a destroyed object";
761 return native_getCamera(this.nativeRef);
763 private native Camera native_getCamera(
long _nativeRef);
766 public void setCamera(Camera newCamera)
768 assert !this.destroyed.get() :
"trying to use a destroyed object";
769 native_setCamera(this.nativeRef, newCamera);
771 private native
void native_setCamera(
long _nativeRef, Camera newCamera);
774 public boolean getRotateGestureEnabled()
776 assert !this.destroyed.get() :
"trying to use a destroyed object";
777 return native_getRotateGestureEnabled(this.nativeRef);
779 private native
boolean native_getRotateGestureEnabled(
long _nativeRef);
782 public void setRotateGestureEnabled(
boolean newRotateGestureEnabled)
784 assert !this.destroyed.get() :
"trying to use a destroyed object";
785 native_setRotateGestureEnabled(this.nativeRef, newRotateGestureEnabled);
787 private native
void native_setRotateGestureEnabled(
long _nativeRef,
boolean newRotateGestureEnabled);
790 public boolean getTiltGesturesEnabled()
792 assert !this.destroyed.get() :
"trying to use a destroyed object";
793 return native_getTiltGesturesEnabled(this.nativeRef);
795 private native
boolean native_getTiltGesturesEnabled(
long _nativeRef);
798 public void setTiltGesturesEnabled(
boolean newTiltGesturesEnabled)
800 assert !this.destroyed.get() :
"trying to use a destroyed object";
801 native_setTiltGesturesEnabled(this.nativeRef, newTiltGesturesEnabled);
803 private native
void native_setTiltGesturesEnabled(
long _nativeRef,
boolean newTiltGesturesEnabled);
806 public boolean getScrollGesturesEnabled()
808 assert !this.destroyed.get() :
"trying to use a destroyed object";
809 return native_getScrollGesturesEnabled(this.nativeRef);
811 private native
boolean native_getScrollGesturesEnabled(
long _nativeRef);
814 public void setScrollGesturesEnabled(
boolean newScrollGesturesEnabled)
816 assert !this.destroyed.get() :
"trying to use a destroyed object";
817 native_setScrollGesturesEnabled(this.nativeRef, newScrollGesturesEnabled);
819 private native
void native_setScrollGesturesEnabled(
long _nativeRef,
boolean newScrollGesturesEnabled);
822 public boolean getZoomGesturesEnabled()
824 assert !this.destroyed.get() :
"trying to use a destroyed object";
825 return native_getZoomGesturesEnabled(this.nativeRef);
827 private native
boolean native_getZoomGesturesEnabled(
long _nativeRef);
830 public void setZoomGesturesEnabled(
boolean newZoomGesturesEnabled)
832 assert !this.destroyed.get() :
"trying to use a destroyed object";
833 native_setZoomGesturesEnabled(this.nativeRef, newZoomGesturesEnabled);
835 private native
void native_setZoomGesturesEnabled(
long _nativeRef,
boolean newZoomGesturesEnabled);
838 public float getPickRadius()
840 assert !this.destroyed.get() :
"trying to use a destroyed object";
841 return native_getPickRadius(this.nativeRef);
843 private native
float native_getPickRadius(
long _nativeRef);
846 public void setPickRadius(
float newPickRadius)
848 assert !this.destroyed.get() :
"trying to use a destroyed object";
849 native_setPickRadius(this.nativeRef, newPickRadius);
851 private native
void native_setPickRadius(
long _nativeRef,
float newPickRadius);
854 public ArrayList<String> getSelectedMapFeatures()
856 assert !this.destroyed.get() :
"trying to use a destroyed object";
857 return native_getSelectedMapFeatures(this.nativeRef);
859 private native ArrayList<String> native_getSelectedMapFeatures(
long _nativeRef);
861 public static native
void setDebugFlag(DebugFlag flag,
boolean on);
863 public static native
boolean getDebugFlag(DebugFlag flag);