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

001
002
003

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: