Chuyển đến nội dung chính

Bài đăng

Hiển thị các bài đăng có nhãn Google Map

Sữa lỗi khi debug thành file apk sau đó cài lên máy thì Activity không hiển thị được Google Map

1/ Thêm biến môi trường Environment Variables: Tab System variables biến Path thêm đường dẫn tới thư mục bin của Java - Ví dụ: C:\Program Files\Java\jdk-11.0.1\bin 2/ Mở PowerShell gõ lệnh: keytool -list -v -keystore "URL ĐẾN FILE KEY STORE" -alias androiddebugkey -storepass android -keypass android Enter nó sẽ sinh ra 1 chuỗi SHA1 2/ Truy cập trang web console.developers.google.com click vào tên API Key Nó sẽ hiện ra trang: Kéo xuống đưới sẽ có chỗ nhập packe name của ứng dụng và SHA1 Nhập 2 thông tin trên rồi nhấn SAVE 3/ Debug lại file apk là được Video tham khảo:

Google Maps Android Custom Info Window Example

https://www.zoftino.com/google-maps-android-custom-info-window-example You can display information about a location where you add a marker on the Google map by customizing info window. This post shows how to define custom info window layout and custom info window adapter and use it to display customized info window on the Google map. You can read my previous tutorial about  Google maps android API  to know how to use Google play service API in android applications and view Google maps android API examples. Before you continue with this example, you may want to learn android and latest features with examples. Please visit  android tutorials  for all android concepts, components and libraries with examples which use latest components and API. Google Maps Android Custom Info Window Example Output Google Maps Android Custom Info Window Example To create custom info window, first you need to define layout for info window with elements such as image and text...

Cách chuyển đổi kiểu String có dấu "." sang kiểu LatLng

NumberFormat nf = NumberFormat. getInstance () ; double lat = 0 ; double lng = 0 ; try { lat = nf.parse(bienQuangCao.getBqc_latitude()).doubleValue() ; lng = nf.parse(bienQuangCao.getBqc_longtidue()).doubleValue() ; makerOptions.position( new LatLng(lat , lng)) ; mMap .addMarker(makerOptions) ; } catch (ParseException e) { e.printStackTrace() ; }