[core] Remove map coordinate setters/getters

This commit is contained in:
Bruno de Oliveira Abinader
2019-03-01 10:00:36 +02:00
parent ba7427b4ac
commit 586b22c0df
10 changed files with 31 additions and 47 deletions

View File

@@ -942,7 +942,7 @@ void NodeMap::SetCenter(const Nan::FunctionCallbackInfo<v8::Value>& info) {
if (center->Length() > 1) { latitude = Nan::Get(center, 1).ToLocalChecked()->NumberValue(); }
try {
nodeMap->map->setLatLng(mbgl::LatLng { latitude, longitude });
nodeMap->map->jumpTo(mbgl::CameraOptions().withCenter(mbgl::LatLng { latitude, longitude }));
} catch (const std::exception &ex) {
return Nan::ThrowError(ex.what());
}