874 CppProxy.setDebugFlag(flag,
887 return CppProxy.getDebugFlag(flag);
892 private final long nativeRef;
893 private final AtomicBoolean destroyed =
new AtomicBoolean(
false);
895 private CppProxy(
long nativeRef)
897 if (nativeRef == 0)
throw new RuntimeException(
"nativeRef is zero");
898 this.nativeRef = nativeRef;
901 private native
void nativeDestroy(
long nativeRef);
902 public void _djinni_private_destroy()
904 boolean destroyed = this.destroyed.getAndSet(
true);
905 if (!destroyed) nativeDestroy(this.nativeRef);
907 protected void finalize() throws java.lang.Throwable
909 _djinni_private_destroy();
916 public void setSublocationId(
int id)
918 assert !this.destroyed.get() :
"trying to use a destroyed object";
919 native_setSublocationId(this.nativeRef,
id);
921 private native
void native_setSublocationId(
long _nativeRef,
int id);
924 public Integer getSublocationId()
926 assert !this.destroyed.get() :
"trying to use a destroyed object";
927 return native_getSublocationId(this.nativeRef);
929 private native Integer native_getSublocationId(
long _nativeRef);
932 public Camera getEnclosingCamera(BoundingBox boundingBox)
934 assert !this.destroyed.get() :
"trying to use a destroyed object";
935 return native_getEnclosingCamera(this.nativeRef, boundingBox);
937 private native Camera native_getEnclosingCamera(
long _nativeRef, BoundingBox boundingBox);
940 public Point screenPositionToMeters(android.graphics.PointF point)
942 assert !this.destroyed.get() :
"trying to use a destroyed object";
943 return native_screenPositionToMeters(this.nativeRef, point);
945 private native Point native_screenPositionToMeters(
long _nativeRef, android.graphics.PointF point);
948 public android.graphics.PointF metersToScreenPosition(Point point,
boolean clipToViewport)
950 assert !this.destroyed.get() :
"trying to use a destroyed object";
951 return native_metersToScreenPosition(this.nativeRef, point, clipToViewport);
953 private native android.graphics.PointF native_metersToScreenPosition(
long _nativeRef, Point point,
boolean clipToViewport);
956 public CircleMapObject addCircleMapObject()
958 assert !this.destroyed.get() :
"trying to use a destroyed object";
959 return native_addCircleMapObject(this.nativeRef);
961 private native CircleMapObject native_addCircleMapObject(
long _nativeRef);
964 public boolean removeCircleMapObject(CircleMapObject circleMapObject)
966 assert !this.destroyed.get() :
"trying to use a destroyed object";
967 return native_removeCircleMapObject(this.nativeRef, circleMapObject);
969 private native
boolean native_removeCircleMapObject(
long _nativeRef, CircleMapObject circleMapObject);
972 public IconMapObject addIconMapObject()
974 assert !this.destroyed.get() :
"trying to use a destroyed object";
975 return native_addIconMapObject(this.nativeRef);
977 private native IconMapObject native_addIconMapObject(
long _nativeRef);
980 public boolean removeIconMapObject(IconMapObject iconMapObject)
982 assert !this.destroyed.get() :
"trying to use a destroyed object";
983 return native_removeIconMapObject(this.nativeRef, iconMapObject);
985 private native
boolean native_removeIconMapObject(
long _nativeRef, IconMapObject iconMapObject);
988 public PolygonMapObject addPolygonMapObject()
990 assert !this.destroyed.get() :
"trying to use a destroyed object";
991 return native_addPolygonMapObject(this.nativeRef);
993 private native PolygonMapObject native_addPolygonMapObject(
long _nativeRef);
996 public boolean removePolygonMapObject(PolygonMapObject polygonMapObject)
998 assert !this.destroyed.get() :
"trying to use a destroyed object";
999 return native_removePolygonMapObject(this.nativeRef, polygonMapObject);
1001 private native
boolean native_removePolygonMapObject(
long _nativeRef, PolygonMapObject polygonMapObject);
1004 public PolylineMapObject addPolylineMapObject()
1006 assert !this.destroyed.get() :
"trying to use a destroyed object";
1007 return native_addPolylineMapObject(this.nativeRef);
1009 private native PolylineMapObject native_addPolylineMapObject(
long _nativeRef);
1012 public boolean removePolylineMapObject(PolylineMapObject polylineMapObject)
1014 assert !this.destroyed.get() :
"trying to use a destroyed object";
1015 return native_removePolylineMapObject(this.nativeRef, polylineMapObject);
1017 private native
boolean native_removePolylineMapObject(
long _nativeRef, PolylineMapObject polylineMapObject);
1020 public DottedPolylineMapObject addDottedPolylineMapObject()
1022 assert !this.destroyed.get() :
"trying to use a destroyed object";
1023 return native_addDottedPolylineMapObject(this.nativeRef);
1025 private native DottedPolylineMapObject native_addDottedPolylineMapObject(
long _nativeRef);
1028 public boolean removeDottedPolylineMapObject(DottedPolylineMapObject dottedPolylineMapObject)
1030 assert !this.destroyed.get() :
"trying to use a destroyed object";
1031 return native_removeDottedPolylineMapObject(this.nativeRef, dottedPolylineMapObject);
1033 private native
boolean native_removeDottedPolylineMapObject(
long _nativeRef, DottedPolylineMapObject dottedPolylineMapObject);
1036 public void removeAllMapObjects()
1038 assert !this.destroyed.get() :
"trying to use a destroyed object";
1039 native_removeAllMapObjects(this.nativeRef);
1041 private native
void native_removeAllMapObjects(
long _nativeRef);
1044 public void pickMapObjectAt(android.graphics.PointF point)
1046 assert !this.destroyed.get() :
"trying to use a destroyed object";
1047 native_pickMapObjectAt(this.nativeRef, point);
1049 private native
void native_pickMapObjectAt(
long _nativeRef, android.graphics.PointF point);
1052 public void pickMapFeatureAt(android.graphics.PointF point)
1054 assert !this.destroyed.get() :
"trying to use a destroyed object";
1055 native_pickMapFeatureAt(this.nativeRef, point);
1057 private native
void native_pickMapFeatureAt(
long _nativeRef, android.graphics.PointF point);
1060 public void addPickListener(PickListener listener)
1062 assert !this.destroyed.get() :
"trying to use a destroyed object";
1063 native_addPickListener(this.nativeRef, listener);
1065 private native
void native_addPickListener(
long _nativeRef, PickListener listener);
1068 public void removePickListener(PickListener listener)
1070 assert !this.destroyed.get() :
"trying to use a destroyed object";
1071 native_removePickListener(this.nativeRef, listener);
1073 private native
void native_removePickListener(
long _nativeRef, PickListener listener);
1076 public void addInputListener(InputListener listener)
1078 assert !this.destroyed.get() :
"trying to use a destroyed object";
1079 native_addInputListener(this.nativeRef, listener);
1081 private native
void native_addInputListener(
long _nativeRef, InputListener listener);
1084 public void removeInputListener(InputListener listener)
1086 assert !this.destroyed.get() :
"trying to use a destroyed object";
1087 native_removeInputListener(this.nativeRef, listener);
1089 private native
void native_removeInputListener(
long _nativeRef, InputListener listener);
1092 public void addCameraListener(CameraListener listener)
1094 assert !this.destroyed.get() :
"trying to use a destroyed object";
1095 native_addCameraListener(this.nativeRef, listener);
1097 private native
void native_addCameraListener(
long _nativeRef, CameraListener listener);
1100 public void removeCameraListener(CameraListener listener)
1102 assert !this.destroyed.get() :
"trying to use a destroyed object";
1103 native_removeCameraListener(this.nativeRef, listener);
1105 private native
void native_removeCameraListener(
long _nativeRef, CameraListener listener);
1108 public void addSublocationChangeListener(SublocationChangeListener listener)
1110 assert !this.destroyed.get() :
"trying to use a destroyed object";
1111 native_addSublocationChangeListener(this.nativeRef, listener);
1113 private native
void native_addSublocationChangeListener(
long _nativeRef, SublocationChangeListener listener);
1116 public void removeSublocationChangeListener(SublocationChangeListener listener)
1118 assert !this.destroyed.get() :
"trying to use a destroyed object";
1119 native_removeSublocationChangeListener(this.nativeRef, listener);
1121 private native
void native_removeSublocationChangeListener(
long _nativeRef, SublocationChangeListener listener);
1124 public void flyTo(Camera camera,
int duration, CameraCallback callback)
1126 assert !this.destroyed.get() :
"trying to use a destroyed object";
1127 native_flyTo(this.nativeRef, camera, duration, callback);
1129 private native
void native_flyTo(
long _nativeRef, Camera camera,
int duration, CameraCallback callback);
1132 public void moveTo(Camera camera,
int duration, AnimationType animationType, CameraCallback callback)
1134 assert !this.destroyed.get() :
"trying to use a destroyed object";
1135 native_moveTo(this.nativeRef, camera, duration, animationType, callback);
1137 private native
void native_moveTo(
long _nativeRef, Camera camera,
int duration, AnimationType animationType, CameraCallback callback);
1140 public boolean selectMapFeature(String featureId)
1142 assert !this.destroyed.get() :
"trying to use a destroyed object";
1143 return native_selectMapFeature(this.nativeRef, featureId);
1145 private native
boolean native_selectMapFeature(
long _nativeRef, String featureId);
1148 public boolean deselectMapFeature(String featureId)
1150 assert !this.destroyed.get() :
"trying to use a destroyed object";
1151 return native_deselectMapFeature(this.nativeRef, featureId);
1153 private native
boolean native_deselectMapFeature(
long _nativeRef, String featureId);
1156 public void deselectAllMapFeatures()
1158 assert !this.destroyed.get() :
"trying to use a destroyed object";
1159 native_deselectAllMapFeatures(this.nativeRef);
1161 private native
void native_deselectAllMapFeatures(
long _nativeRef);
1164 public void applyFilter(String filter, String layer)
1166 assert !this.destroyed.get() :
"trying to use a destroyed object";
1167 native_applyFilter(this.nativeRef, filter, layer);
1169 private native
void native_applyFilter(
long _nativeRef, String filter, String layer);
1172 public float getZoomFactor()
1174 assert !this.destroyed.get() :
"trying to use a destroyed object";
1175 return native_getZoomFactor(this.nativeRef);
1177 private native
float native_getZoomFactor(
long _nativeRef);
1180 public void setZoomFactor(
float newZoomFactor)
1182 assert !this.destroyed.get() :
"trying to use a destroyed object";
1183 native_setZoomFactor(this.nativeRef, newZoomFactor);
1185 private native
void native_setZoomFactor(
long _nativeRef,
float newZoomFactor);
1188 public float getMinZoomFactor()
1190 assert !this.destroyed.get() :
"trying to use a destroyed object";
1191 return native_getMinZoomFactor(this.nativeRef);
1193 private native
float native_getMinZoomFactor(
long _nativeRef);
1196 public void setMinZoomFactor(
float newMinZoomFactor)
1198 assert !this.destroyed.get() :
"trying to use a destroyed object";
1199 native_setMinZoomFactor(this.nativeRef, newMinZoomFactor);
1201 private native
void native_setMinZoomFactor(
long _nativeRef,
float newMinZoomFactor);
1204 public float getMaxZoomFactor()
1206 assert !this.destroyed.get() :
"trying to use a destroyed object";
1207 return native_getMaxZoomFactor(this.nativeRef);
1209 private native
float native_getMaxZoomFactor(
long _nativeRef);
1212 public void setMaxZoomFactor(
float newMaxZoomFactor)
1214 assert !this.destroyed.get() :
"trying to use a destroyed object";
1215 native_setMaxZoomFactor(this.nativeRef, newMaxZoomFactor);
1217 private native
void native_setMaxZoomFactor(
long _nativeRef,
float newMaxZoomFactor);
1220 public boolean getStickToBorder()
1222 assert !this.destroyed.get() :
"trying to use a destroyed object";
1223 return native_getStickToBorder(this.nativeRef);
1225 private native
boolean native_getStickToBorder(
long _nativeRef);
1228 public void setStickToBorder(
boolean newStickToBorder)
1230 assert !this.destroyed.get() :
"trying to use a destroyed object";
1231 native_setStickToBorder(this.nativeRef, newStickToBorder);
1233 private native
void native_setStickToBorder(
long _nativeRef,
boolean newStickToBorder);
1236 public Camera getCamera()
1238 assert !this.destroyed.get() :
"trying to use a destroyed object";
1239 return native_getCamera(this.nativeRef);
1241 private native Camera native_getCamera(
long _nativeRef);
1244 public void setCamera(Camera newCamera)
1246 assert !this.destroyed.get() :
"trying to use a destroyed object";
1247 native_setCamera(this.nativeRef, newCamera);
1249 private native
void native_setCamera(
long _nativeRef, Camera newCamera);
1252 public boolean getRotateGestureEnabled()
1254 assert !this.destroyed.get() :
"trying to use a destroyed object";
1255 return native_getRotateGestureEnabled(this.nativeRef);
1257 private native
boolean native_getRotateGestureEnabled(
long _nativeRef);
1260 public void setRotateGestureEnabled(
boolean newRotateGestureEnabled)
1262 assert !this.destroyed.get() :
"trying to use a destroyed object";
1263 native_setRotateGestureEnabled(this.nativeRef, newRotateGestureEnabled);
1265 private native
void native_setRotateGestureEnabled(
long _nativeRef,
boolean newRotateGestureEnabled);
1268 public boolean getTiltGesturesEnabled()
1270 assert !this.destroyed.get() :
"trying to use a destroyed object";
1271 return native_getTiltGesturesEnabled(this.nativeRef);
1273 private native
boolean native_getTiltGesturesEnabled(
long _nativeRef);
1276 public void setTiltGesturesEnabled(
boolean newTiltGesturesEnabled)
1278 assert !this.destroyed.get() :
"trying to use a destroyed object";
1279 native_setTiltGesturesEnabled(this.nativeRef, newTiltGesturesEnabled);
1281 private native
void native_setTiltGesturesEnabled(
long _nativeRef,
boolean newTiltGesturesEnabled);
1284 public boolean getScrollGesturesEnabled()
1286 assert !this.destroyed.get() :
"trying to use a destroyed object";
1287 return native_getScrollGesturesEnabled(this.nativeRef);
1289 private native
boolean native_getScrollGesturesEnabled(
long _nativeRef);
1292 public void setScrollGesturesEnabled(
boolean newScrollGesturesEnabled)
1294 assert !this.destroyed.get() :
"trying to use a destroyed object";
1295 native_setScrollGesturesEnabled(this.nativeRef, newScrollGesturesEnabled);
1297 private native
void native_setScrollGesturesEnabled(
long _nativeRef,
boolean newScrollGesturesEnabled);
1300 public boolean getZoomGesturesEnabled()
1302 assert !this.destroyed.get() :
"trying to use a destroyed object";
1303 return native_getZoomGesturesEnabled(this.nativeRef);
1305 private native
boolean native_getZoomGesturesEnabled(
long _nativeRef);
1308 public void setZoomGesturesEnabled(
boolean newZoomGesturesEnabled)
1310 assert !this.destroyed.get() :
"trying to use a destroyed object";
1311 native_setZoomGesturesEnabled(this.nativeRef, newZoomGesturesEnabled);
1313 private native
void native_setZoomGesturesEnabled(
long _nativeRef,
boolean newZoomGesturesEnabled);
1316 public float getPickRadius()
1318 assert !this.destroyed.get() :
"trying to use a destroyed object";
1319 return native_getPickRadius(this.nativeRef);
1321 private native
float native_getPickRadius(
long _nativeRef);
1324 public void setPickRadius(
float newPickRadius)
1326 assert !this.destroyed.get() :
"trying to use a destroyed object";
1327 native_setPickRadius(this.nativeRef, newPickRadius);
1329 private native
void native_setPickRadius(
long _nativeRef,
float newPickRadius);
1332 public ArrayList<String> getSelectedMapFeatures()
1334 assert !this.destroyed.get() :
"trying to use a destroyed object";
1335 return native_getSelectedMapFeatures(this.nativeRef);
1337 private native ArrayList<String> native_getSelectedMapFeatures(
long _nativeRef);
1339 public static native
void setDebugFlag(DebugFlag flag,
boolean on);
1341 public static native
boolean getDebugFlag(DebugFlag flag);