German Map SDK Usage lessons

Source: Internet
Author: User

Below is the version of the German map Android SDK, which is detailed below:

Map: v2.3.1

Location: v1.3.0


Some of the problems identified are map bugs, some of which require your own caution:

1, positioning.

public void Requestlocationdata (java.lang.String provider,                       long mintime,                       float mindistance,                       Amaplocationlistener listener)
For the second parameter, it affects the callback time for all callback interfaces. The official reply to the message is that it will take the maximum number of the second parameter passed in as the callback time.

That is, if you call this interface somewhere, set a one-minute callback, Requestlocationdata (XXX, x, XX, Xxxlistener), and in the map, Add an event to the position button: requestlocationdata (XXX,-1, XX, Xxxxxlistener), then this location event will be recalled after 1 minutes. If you have the need to update your location regularly, write your own timer.

Impact: larger.


2, scale.

If you do not call this interface:mUiSettings.setScaleControlsEnabled(true);那么会有以下结果:

两指缩放地图,会显示出比例尺,并且比例尺会随着地图变化。

Double-clicking, or clicking the Zoom button to zoom the map does not make the scale bar appear. And if the scale is present, it will not change with the map.

Based on the above results, the scale is inconsistent with the actual.

For this issue, the official email reply is identified as a known issue.

Workaround, very simple, manually set to True or false on the line.

Impact: Very small.


3, display Infowindow.

When adding marker, be sure to set the anchor to Markeroptions, otherwise you cannot display Infowindow. This problem has been tangled up with me for a long time, and finally, after a nearly line-by-row comparison with the demo code, add this line of code and then come out Infowindow.

German Map SDK Usage lessons

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.