Ví dụ hay về xử lý hiển thị mapbase Google API
Show me the code! - By Davanum Srinivas
Without much Ado – Here are the screen shots
![]() |
![]() |
![]() |
Key strokes
- S – Toggle satellite imagery
- T – Toggle traffic imagery
- I – Zoom in
- O – Zoom out
- F – Search for addresses or businesses
- P – Search for pizza 🙂
- 1 / 2 / 3 …. 9 – Display information about a specific item and center it
Code sample for Overlays
package org.apache.maps; import android.graphics.Canvas; import android.graphics.Paint; import com.google.android.maps.Overlay; import com.google.android.maps.Point; import com.google.googlenav.Placemark; import com.google.googlenav.Search; public class MyOverlay extends Overlay { BrowseMap mMap; Paint paint1 = new Paint(); Paint paint2 = new Paint(); public MyOverlay(BrowseMap map) { mMap = map; paint2.setARGB(255, 255, 255, 255); } public void draw(Canvas canvas, PixelCalculator pixelCalculator, boolean b) { super.draw(canvas, pixelCalculator, b); Search search = mMap.getSearch(); if (search != null) { for (int i = 0; i < search.numPlacemarks(); i++) { Placemark placemark = search.getPlacemark(i); int[] screenCoords = new int[2]; Point point =…
View original post 30 more words
Advertisements