Baidu Map Add Overlay

Source: Internet
Author: User

Follow the official demo after deployment. Add a cover.

Required classes:

The Bitmapdescriptor bitmap Image object is used to display the area of the overlay.

Mapview the primary object has a control instantiation on the page.

Baidumap has Mapview.getmap (); Map object. You can add a variety of things to the map.

Mapstatusupdate describes the changes that will occur in the map state.

LATLNG geographic coordinates the basic data structure is instantiated directly by latitude longitude.

Overlayoptions overlay Configuration object. Can be the overlay icon, location and so on.

Main methods:

Overlay icon Bitmapdescriptor BdA = Bitmapdescriptorfactory.fromresource (R.drawable.weizhi);

The geographical location of the coverings latlng LlA = new Latlng (39.963175, 116.400244);

Overlay Configuration Object Overlayoptions OoA new Markeroptions (). Position (LlA). Icon (BdA). ZIndex (9)
Covering Object Mmarkera = (Marker) (Mbaidumap.addoverlay (OoA));

Baidu Map Add Overlay

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.