[android] #5291 - Fixing merge conflicts

This commit is contained in:
Brad Leege
2016-06-09 14:35:10 -05:00
parent d67b88dba9
commit b90571107d
3 changed files with 4 additions and 23 deletions

View File

@@ -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) {

View File

@@ -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);

View File

@@ -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 {