[android] #5291 - Fixing merge conflicts
This commit is contained in:
@@ -371,9 +371,7 @@ final class NativeMapView {
|
||||
}
|
||||
|
||||
public void updateMarker(Marker marker) {
|
||||
LatLng position = marker.getPosition();
|
||||
Icon icon = marker.getIcon();
|
||||
nativeUpdateMarker(mNativeMapViewPtr, marker.getId(), position.getLatitude(), position.getLongitude(), icon.getId());
|
||||
nativeUpdateMarker(mNativeMapViewPtr, marker);
|
||||
}
|
||||
|
||||
public void removeAnnotation(long id) {
|
||||
|
||||
@@ -660,25 +660,8 @@ void nativeResetNorth(JNIEnv *env, jni::jobject* obj, jlong nativeMapViewPtr) {
|
||||
nativeMapView->getMap().resetNorth();
|
||||
}
|
||||
|
||||
jlong nativeAddMarker(JNIEnv *env, jni::jobject* obj, jlong nativeMapViewPtr, jni::jobject* marker) {
|
||||
mbgl::Log::Debug(mbgl::Event::JNI, "nativeAddMarker");
|
||||
assert(nativeMapViewPtr != 0);
|
||||
NativeMapView *nativeMapView = reinterpret_cast<NativeMapView *>(nativeMapViewPtr);
|
||||
void nativeUpdateMarker(JNIEnv *env, jni::jobject* obj, jlong nativeMapViewPtr, jni::jobject* marker) {
|
||||
|
||||
jni::jobject* position = jni::GetField<jni::jobject*>(*env, marker, *markerPositionId);
|
||||
jni::jobject* icon = jni::GetField<jni::jobject*>(*env, marker, *markerIconId);
|
||||
|
||||
jni::jstring* jid = reinterpret_cast<jni::jstring*>(jni::GetField<jni::jobject*>(*env, icon, *iconIdId));
|
||||
std::string id = std_string_from_jstring(env, jid);
|
||||
|
||||
jdouble latitude = jni::GetField<jdouble>(*env, position, *latLngLatitudeId);
|
||||
jdouble longitude = jni::GetField<jdouble>(*env, position, *latLngLongitudeId);
|
||||
|
||||
// Because Java only has int, not unsigned int, we need to bump the annotation id up to a long.
|
||||
return nativeMapView->getMap().addPointAnnotation(mbgl::PointAnnotation(mbgl::LatLng(latitude, longitude), id));
|
||||
}
|
||||
|
||||
void nativeUpdateMarker(JNIEnv *env, jni::jobject* obj, jlong nativeMapViewPtr, jlong markerId, jdouble lat, jdouble lon, jni::jstring* jid) {
|
||||
mbgl::Log::Debug(mbgl::Event::JNI, "nativeUpdateMarker");
|
||||
assert(nativeMapViewPtr != 0);
|
||||
NativeMapView *nativeMapView = reinterpret_cast<NativeMapView *>(nativeMapViewPtr);
|
||||
|
||||
@@ -25,7 +25,7 @@ public:
|
||||
if (bound_shader == 0) {
|
||||
vertexBuffer.bind(store);
|
||||
shader.bind(offset);
|
||||
if (vao.created()) {
|
||||
if (vao) {
|
||||
storeBinding(shader, vertexBuffer.getID(), 0, offset);
|
||||
}
|
||||
} else {
|
||||
@@ -40,7 +40,7 @@ public:
|
||||
vertexBuffer.bind(store);
|
||||
elementsBuffer.bind(store);
|
||||
shader.bind(offset);
|
||||
if (vao.created()) {
|
||||
if (vao) {
|
||||
storeBinding(shader, vertexBuffer.getID(), elementsBuffer.getID(), offset);
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user