Differences when using new versus old getMapPreview function

Carlos Vela shared this problem 3 weeks ago
In Progress

When using the new getMapPreview function I'm getting an image with the wrong zoom level. Image scale is bigger than using the old getMapPreview function. Do I miss something? I'm sending the same LocCenter, ZoomLevel, WidthPx and HeightPx values. In the new function I see other parameters which I'm not using, but still I think I should get a similar image between these functions.

Thanks in advance for your support.

Comments (1)


Good day Carlos,

nice to see that someone is trying to use Locus API :).

The new method of generating map preview brings some additional parameters. Anyway should not generate too different images. Did you used "TinyMode" parameter in the old system? This method generated map scaled by 0.4x , so it was a lot smaller. You may achieve same result with "densityDpi" parameter. By default Locus Map use value obtained by getResources().getDisplayMetrics().densityDpi , you may anyway supply own parameter (for example twice a big) and Locus Map should then generate map optimized for higher density screen which will have a similar result as previous "tinyMode".

Let me know if this helps.

We made this new API mainly to support our new add-on Wear for Wear OS, where is possible to rotate and pan with map directly on watches. And I have to say that it works well. Expect minor scaling problems with icons and texts on vector maps in case, you will have turned screen on with active Locus Map in the foreground, sorry for this (a problem in sharing same map core for rendering map in Locus Map and also for this preview function).