From 6e41664cb033ee5edf6ae5ac66ed518d9f0d1f89 Mon Sep 17 00:00:00 2001 From: "Justin R. Miller" Date: Mon, 16 Feb 2015 09:52:36 -0800 Subject: fixes #476 & #853: pixel/meter/latlng conversion routines in core & iOS --- linux/main.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'linux') diff --git a/linux/main.cpp b/linux/main.cpp index 12f77ffe58..6688905ea9 100644 --- a/linux/main.cpp +++ b/linux/main.cpp @@ -72,7 +72,7 @@ int main(int argc, char *argv[]) { // Load settings mbgl::Settings_JSON settings; - map.setLonLatZoom(settings.longitude, settings.latitude, settings.zoom); + map.setLatLngZoom(mbgl::LatLng(settings.latitude, settings.longitude), settings.zoom); map.setBearing(settings.bearing); map.setDebug(settings.debug); @@ -94,7 +94,10 @@ int main(int argc, char *argv[]) { int ret = view->run(); // Save settings - map.getLonLatZoom(settings.longitude, settings.latitude, settings.zoom); + mbgl::LatLng latLng = map.getLatLng(); + settings.latitude = latLng.latitude; + settings.longitude = latLng.longitude; + settings.zoom = map.getZoom(); settings.bearing = map.getBearing(); settings.debug = map.getDebug(); settings.save(); -- cgit v1.2.1