我正在尝试向地图上的标记/图钉添加信息窗口。自动柜员机,它不起作用。当前代码:TravelBuddy.java/TabHost
package com.jappapps.android.travelbuddy; import java.util.List; import android.app.TabActivity; import android.content.Context; import android.content.Intent; import android.graphics.drawable.Drawable; import android.os.Bundle; import android.webkit.WebView; import android.widget.TabHost; import android.widget.TabHost.TabSpec; import com.google.android.maps.Overlay; public class TravelBuddy extends TabActivity { TabHost mTabHost; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //setContentView(R.layout.main); Context ctx = this.getApplicationContext(); //tab 1 mTabHost = getTabHost(); TabSpec tabSpec1 = mTabHost.newTabSpec("Maps"); tabSpec1.setIndicator("Map"); Intent i1 = new Intent(ctx, MapTabView.class); tabSpec1.setContent(i1); mTabHost.addTab(tabSpec1); //tab2 mTabHost = getTabHost(); TabSpec tabSpec2 = mTabHost.newTabSpec("Web"); tabSpec2.setIndicator("Featured"); Intent i2 = new Intent(ctx, WebView1.class); tabSpec2.setContent(i2); mTabHost.addTab(tabSpec2); /* List<Overlay> mapOverlays = mapView.getOverlays(); Drawable drawable = this.getResources().getDrawable(R.drawable.androidmarker); Overlays itemizedoverlay = new Overlays(drawable);*/ } }
MapTabView.java/Map:
package com.jappapps.android.travelbuddy; import java.util.List; import android.graphics.drawable.Drawable; import android.os.Bundle; import com.google.android.maps.GeoPoint; import com.google.android.maps.MapActivity; import com.google.android.maps.MapController; import com.google.android.maps.MapView; import com.google.android.maps.Overlay; import com.google.android.maps.OverlayItem; public class MapTabView extends MapActivity { MapController mapController; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.maptabview); MapView mapView = (MapView) findViewById(R.id.mapview); mapView.setBuiltInZoomControls(true); List<Overlay> mapOverlays = mapView.getOverlays(); Drawable drawable = this.getResources().getDrawable(R.drawable.androidmarker); Overlays1 itemizedoverlay = new Overlays1(drawable); GeoPoint un = new GeoPoint((int) (59.911868847598406*1E6), (int) (10.73362112045288*1E6)); OverlayItem overlayitem = new OverlayItem(un, "Oslo Rådhus", "Oslo Rådhus"); GeoPoint lc = new GeoPoint((int) (59.913676042809527*1E6), (int) (10.739468336105347*1E6)); OverlayItem overlayitem2 = new OverlayItem(lc, "Grand Hotel/Grand Cafe", "Grand Hotel/Grand Cafe"); GeoPoint pr = new GeoPoint((int) (59.906446671638705*1E6), (int) (10.736163854598999*1E6)); OverlayItem overlayitem3 = new OverlayItem(pr, "Akershus Festning", "Akershus Festning"); GeoPoint dtc = new GeoPoint((int) (59.96375425571723*1E6), (int) (10.668411254882812*1E6)); OverlayItem overlayitem4 = new OverlayItem(dtc, "Holmenkollen Nasjonalanlegg", "Holmenkollen Nasjonalanlegg"); GeoPoint un1 = new GeoPoint((int) (48.873818*1E6), (int) (2.295023*1E6)); OverlayItem overlayitem5 = new OverlayItem(un1, "Arc De Triomphe", "Arc De Triomphe"); GeoPoint lc1 = new GeoPoint((int) (48.858205*1E6), (int) (2.294359*1E6)); OverlayItem overlayitem6 = new OverlayItem(lc1, "Eiffel Tower", "Eiffel Tower"); GeoPoint pr1 = new GeoPoint((int) (48.85253054945084*1E6), (int) (2.3359479010105133*1E6)); OverlayItem overlayitem7 = new OverlayItem(pr1, "Le Golfe De Naples", "Akershus Festning"); GeoPoint dtc1 = new GeoPoint((int) (48.8701101964186*1E6), (int) (2.30538547039032*1E6)); OverlayItem overlayitem8 = new OverlayItem(dtc1, "L'Atelier Renault", "L'Atelier Renault"); GeoPoint dtc2 = new GeoPoint((int) (48.86751841374421*1E6), (int) (2.322430908679962*1E6)); OverlayItem overlayitem9 = new OverlayItem(dtc2, "Maxims", "Maxims"); GeoPoint un2 = new GeoPoint((int) (48.85047705575626*1E6), (int) (2.2914178669452667*1E6)); OverlayItem overlayitem10 = new OverlayItem(un2, "Hotel Eiffel Capitol", "Hotel Eiffel Capitol"); GeoPoint lc2 = new GeoPoint((int) (48.837701*1E6), (int) (2.34641*1E6)); OverlayItem overlayitem11 = new OverlayItem(lc2, "The Five Hotel", "The Five Hotel"); GeoPoint pr2 = new GeoPoint((int) (48.8484067*1E6), (int) (2.2971547*1E6)); OverlayItem overlayitem12 = new OverlayItem(pr2, "Hotel Saphir Grenelle", "Hotel Sapfir Grenelle"); GeoPoint dtc3 = new GeoPoint((int) (48.84850466945429*1E6), (int) (2.3204205930233*1E6)); OverlayItem overlayitem13 = new OverlayItem(dtc3, "Hotel Vaneau Saint-Germain", "Vaneau Saint-Germain"); GeoPoint un3 = new GeoPoint((int) (48.8663741*1E6), (int) (2.3084308*1E6)); OverlayItem overlayitem14 = new OverlayItem(un3, "Hotel San Régis", "Hotel San Régis"); GeoPoint lc3 = new GeoPoint((int) (48.88319585446909*1E6), (int) (2.2988489270210266*1E6)); OverlayItem overlayitem15 = new OverlayItem(lc3, "Bacino", "Bacino"); GeoPoint pr3 = new GeoPoint((int) (51.50056503296835*1E6), (int) (-0.1246422529220581*1E6)); OverlayItem overlayitem16 = new OverlayItem(pr3, "Big Ben", "Big Ben"); GeoPoint dtc4 = new GeoPoint((int) (51.49942628765944*1E6), (int) (-0.12577414512634277*1E6)); OverlayItem overlayitem17 = new OverlayItem(dtc4, "Houses Of Parliament", "Houses Of Parliament"); GeoPoint dtc5 = new GeoPoint((int) (51.50163696369762*1E6), (int) (-0.1411592960357666*1E6)); OverlayItem overlayitem18 = new OverlayItem(dtc5, "Buckingham Palace", "Buckingham Palace"); GeoPoint un4 = new GeoPoint((int) (51.50558385576479*1E6), (int) (-0.08531838655471802*1E6)); OverlayItem overlayitem19 = new OverlayItem(un4, "London Dungeon", "London Dungeon"); GeoPoint lc5 = new GeoPoint((int) (51.41935569771223*1E6), (int) (-0.19598767161369324*1E6)); OverlayItem overlayitem20 = new OverlayItem(lc5, "Antoinette Hotel Wimbledon", "Antoinette Hotel Wimbledon"); GeoPoint pr5 = new GeoPoint((int) (51.5120631*1E6), (int) (-0.0790412*1E6)); OverlayItem overlayitem21 = new OverlayItem(pr5, "The Tower - A Guoman Hotel", "The Tower - A Guoman Hotel"); GeoPoint dtc6 = new GeoPoint((int) (51.50645199258505*1E6), (int) (-0.07380366325378418*1E6)); OverlayItem overlayitem22 = new OverlayItem(dtc6, "Water Cafe", "Water Cafe"); GeoPoint un5 = new GeoPoint((int) (51.50650541584913*1E6), (int) (-0.07335305213928223*1E6)); OverlayItem overlayitem23 = new OverlayItem(un5, "The Brasserie", "The Brasserie"); GeoPoint lc6 = new GeoPoint((int) (51.51877441241732*1E6), (int) (-0.1319056749343872*1E6)); OverlayItem overlayitem24 = new OverlayItem(lc6, "MyHotel Bloomsbury", "MyHotel Bloomsbury"); GeoPoint pr6 = new GeoPoint((int) (40.4528417284077*1E6), (int) (-3.6893677711486816*1E6)); OverlayItem overlayitem25 = new OverlayItem(pr6, "Santiago Bernabeu", "Santiago Bernabeu"); GeoPoint dtc7 = new GeoPoint((int) (40.41366759389503*1E6), (int) (-3.692554235458374*1E6)); OverlayItem overlayitem26 = new OverlayItem(dtc7, "Prado Museum", "Prado Museum"); GeoPoint dtc8 = new GeoPoint((int) (40.4163542*1E6), (int) (-3.6949915*1E6)); OverlayItem overlayitem27 = new OverlayItem(dtc8, "Thyssen Museum", "Thyssen Museum"); GeoPoint un6 = new GeoPoint((int) (40.4085453*1E6), (int) (-3.6940541*1E6)); OverlayItem overlayitem28 = new OverlayItem(un6, "Reina Sofia", "Reina Sofia"); GeoPoint lc7 = new GeoPoint((int) (40.440325146081875*1E6), (int) (-3.670211434364319*1E6)); OverlayItem overlayitem29 = new OverlayItem(lc7, "Hotel Silken Puerta America", "Hotel Silken Puerta America"); GeoPoint pr7 = new GeoPoint((int) (40.41960806285972*1E6), (int) (-3.6996057629585266*1E6)); OverlayItem overlayitem30 = new OverlayItem(pr7, "Hotel De Las Letras", "Hotel De Las Letras"); GeoPoint dtc9 = new GeoPoint((int) (40.440325146081875*1E6), (int) (-3.670211434364319*1E6)); OverlayItem overlayitem31 = new OverlayItem(dtc9, "MAD Resturant", "MAD Resturant"); GeoPoint un7 = new GeoPoint((int) (41.40314508867334*1E6), (int) (2.1737265586853027*1E6)); OverlayItem overlayitem32 = new OverlayItem(un7, "Sagrada Familia", "Sagrada Familia"); GeoPoint lc8 = new GeoPoint((int) (41.41350532776538*1E6), (int) (2.1529877185821533*1E6)); OverlayItem overlayitem33 = new OverlayItem(lc8, "Park Güell", "Park Güell"); GeoPoint pr8= new GeoPoint((int) (41.38142144742531*1E6), (int) (2.1210265159606934*1E6)); OverlayItem overlayitem34 = new OverlayItem(pr8, "Camp Nou", "Camp Nou"); GeoPoint dtc10 = new GeoPoint((int) (41.4974299*1E6), (int) (2.1574864*1E6)); OverlayItem overlayitem35 = new OverlayItem(dtc10, "Museum Picasso", "Museum Picasso"); GeoPoint dtc11 = new GeoPoint((int) (41.3839147*1E6), (int) (2.183351*1E6)); OverlayItem overlayitem36 = new OverlayItem(dtc11, "Resturant Cal Pep", "Resturant Cal Pep"); GeoPoint un8 = new GeoPoint((int) (59.911868847598406*1E6), (int) (10.73362112045288*1E6)); OverlayItem overlayitem37 = new OverlayItem(un8, "Alkimia Resturant", "Alkimia Resturant"); GeoPoint lc9 = new GeoPoint((int) (41.3909339796086*1E6), (int) (2.149248719215393*1E6)); OverlayItem overlayitem38 = new OverlayItem(lc9, "Resturant Vinya Roel", "Resturant Vinya Roel"); GeoPoint pr9 = new GeoPoint((int) (41.410423580724746*1E6), (int) (2.136486768722534*1E6)); OverlayItem overlayitem39 = new OverlayItem(pr9, "ABAC Hotel", "ABAC Hotel"); GeoPoint dtc12 = new GeoPoint((int) (41.3776992*1E6), (int) (2.1390646*1E6)); OverlayItem overlayitem40 = new OverlayItem(dtc12, "Hotel AC Sants", "Hotel AC Sants"); GeoPoint un9 = new GeoPoint((int) (41.38435766200757*1E6), (int) (2.178337275981903*1E6)); OverlayItem overlayitem41 = new OverlayItem(un9, "Hotel H10 Montcada", "Hotel H10 Montcada"); GeoPoint lc10 = new GeoPoint((int) (41.88996250292627*1E6), (int) (12.49321460723877*1E6)); OverlayItem overlayitem42 = new OverlayItem(lc10, "Colosseum", "Colosseum"); GeoPoint pr10 = new GeoPoint((int) (41.90089556707864*1E6), (int) (12.48333603143692*1E6)); OverlayItem overlayitem43 = new OverlayItem(pr10, "Trevi Fountain", "Trevi Fountain"); GeoPoint dtc13 = new GeoPoint((int) (41.8933727975499*1E6), (int) (12.483032941818237*1E6)); OverlayItem overlayitem44 = new OverlayItem(dtc13, "Capitoline Museums", "Capitoline Museums"); GeoPoint dtc14 = new GeoPoint((int) (41.903061593027836*1E6), (int) (12.45436280965805*1E6)); OverlayItem overlayitem45 = new OverlayItem(dtc14, "Sistine Chapel", "Sistine Chapel"); GeoPoint un10 = new GeoPoint((int) (41.9058324020521341E6), (int) (12.482188045978546*1E6)); OverlayItem overlayitem46 = new OverlayItem(un10, "Piazza Di Spagna", "Piazza Di Spagna"); GeoPoint lc11 = new GeoPoint((int) (41.9005422084091*1E6), (int) (12.476523220539093*1E6)); OverlayItem overlayitem47 = new OverlayItem(lc11, "Gelateria Della Palma", "Gelateria Della Palma"); GeoPoint pr11 = new GeoPoint((int) (41.8993638*1E6), (int) (12.4727763*1E6)); OverlayItem overlayitem48 = new OverlayItem(pr11, "Resturant Tre Scalini", "Resturant Tre Scalini"); GeoPoint dtc15 = new GeoPoint((int) (41.89913673988211*1E6), (int) (12.49245822429657*1E6)); OverlayItem overlayitem49 = new OverlayItem(dtc15, "Pizzeria Est! Est! Est! Dei Fratelli Ricci", "Pizzeria Est! Est! Est! Dei Fratelli Ricci"); GeoPoint un11 = new GeoPoint((int) (41.8987143*1E6), (int) (12.4715744*1E6)); OverlayItem overlayitem50 = new OverlayItem(un11, "Hotel Teatro Pace 33", "Hotel Teatro Pace 33"); GeoPoint lc12 = new GeoPoint((int) (41.896669109513695*1E6), (int) (12.50568151473999*1E6)); OverlayItem overlayitem51 = new OverlayItem(lc12, "Radisson Sas Es Hotel Roma", "Radisson Sas Es Hotel Roma"); GeoPoint pr13 = new GeoPoint((int) (41.895373*1E6), (int) (12.4892684*1E6)); OverlayItem overlayitem52 = new OverlayItem(pr13, "Casa Il Rosario", "Casa Il Rosario"); GeoPoint dtc16 = new GeoPoint((int) (43.701068*1E6), (int) (7.2796387*1E6)); OverlayItem overlayitem53 = new OverlayItem(dtc16, "Resturant Au Petit Gari", "Resturant Au Petit Gari"); GeoPoint dtc17 = new GeoPoint((int) (43.705593*1E6), (int) (7.2821517*1E6)); OverlayItem overlayitem54 = new OverlayItem(dtc17, "Hotel Relais Acropolis", "Hotel Relais Acropolis"); GeoPoint un12 = new GeoPoint((int) (51.50558385576479*1E6), (int) (-0.08531838655471802*1E6)); OverlayItem overlayitem55 = new OverlayItem(un12, "Holiday Inn Hotel Resort Port St.Laurent", "Holiday Inn Hotel Resort Port St.Laurent"); GeoPoint lc13 = new GeoPoint((int) (43.6989919*1E6), (int) (7.2601172*1E6)); OverlayItem overlayitem56 = new OverlayItem(lc13, "Gounod Hotel", "Gounod Hotel"); GeoPoint pr14 = new GeoPoint((int) (48.21070419133567*1E6), (int) (16.358535289764404*1E6)); OverlayItem overlayitem57 = new OverlayItem(pr14, "Vienna City Hall/Rathaus", "Vienna City Hall/Rathaus"); GeoPoint dtc18 = new GeoPoint((int) (48.20055071992264*1E6), (int) (16.37714982032776*1E6)); OverlayItem overlayitem58 = new OverlayItem(dtc18, "Imperial Court Theatre", "Imperial Court Theatre"); GeoPoint un13 = new GeoPoint((int) (48.2169714*1E6), (int) (16.39592*1E6)); OverlayItem overlayitem59 = new OverlayItem(un13, "Wiener Riesenrad", "Wiener Riesenrad"); GeoPoint lc14 = new GeoPoint((int) (48.2027121*1E6), (int) (16.3702019*1E6)); OverlayItem overlayitem60 = new OverlayItem(lc14, "Resturant Korso", "Resturant Korso"); GeoPoint pr15 = new GeoPoint((int) (48.2096951*1E6), (int) (16.3737617*1E6)); OverlayItem overlayitem61 = new OverlayItem(pr15, "Pizza Bizi", "Pizza Bizi"); GeoPoint dtc19 = new GeoPoint((int) (48.2044364*1E6), (int) (16.3813728*1E6)); OverlayItem overlayitem62 = new OverlayItem(dtc19, "Resturant Steirereck", "Restrant Steirereck"); GeoPoint dtc20 = new GeoPoint((int) (48.20973540822208*1E6), (int) (16.365820169448853*1E6)); OverlayItem overlayitem63 = new OverlayItem(dtc20, "Steigenberger Hotel Herrenhof", "Steigenberger Hotel Herrenhof"); GeoPoint un14 = new GeoPoint((int) (48.2016895*1E6), (int) (16.37109831*1E6)); OverlayItem overlayitem64 = new OverlayItem(un14, "The Ring Hotel", "The Ring Hotel"); GeoPoint lc15 = new GeoPoint((int) (48.2021021*1E6), (int) (16.3721863*1E6)); OverlayItem overlayitem65 = new OverlayItem(lc15, "Grand Hotel Wien", "Grand Hotel Wien"); GeoPoint pr16 = new GeoPoint((int) (59.32845018256806*1E6), (int) (18.09195041656494*1E6)); OverlayItem overlayitem66 = new OverlayItem(pr16, "The Vasa Museum", "The Vasa Museum"); GeoPoint dtc21 = new GeoPoint((int) (59.32970893771183*1E6), (int) (18.092358112335205*1E6)); OverlayItem overlayitem67 = new OverlayItem(dtc21, "Junibacken", "Junibacken"); GeoPoint un15 = new GeoPoint((int) (59.3073348*1E6), (int) (18.0747967*1E6)); OverlayItem overlayitem68 = new OverlayItem(un15, "Clarion Hotel Stockholm", "Clarion Hotel Stockholm"); GeoPoint lc16 = new GeoPoint((int) (59.3254337*1E6), (int) (18.0753632*1E6)); OverlayItem overlayitem69 = new OverlayItem(lc16, "Hotel Reisen", "Hotel Reisen"); GeoPoint pr17= new GeoPoint((int) (59.3299036*1E6), (int) (18.0715709*1E6)); OverlayItem overlayitem70 = new OverlayItem(pr17, "Cafe Opera", "Cafe Opera"); GeoPoint dtc22 = new GeoPoint((int) (41.4974299*1E6), (int) (2.1574864*1E6)); OverlayItem overlayitem71 = new OverlayItem(dtc22, "Sturehof Resturant", "Sturehof Resturant"); GeoPoint dtc23 = new GeoPoint((int) (55.692711148828536*1E6), (int) (12.599140405654907*1E6)); OverlayItem overlayitem72 = new OverlayItem(dtc23, "The Little Mermaid", "The Little Mermaid"); GeoPoint un16 = new GeoPoint((int) (55.67800786998909*1E6), (int) (12.572801113128662*1E6)); OverlayItem overlayitem73 = new OverlayItem(un16, "Strøget", "Strøget"); GeoPoint lc17 = new GeoPoint((int) (55.6747595*1E6), (int) (12.565412*1E6)); OverlayItem overlayitem74 = new OverlayItem(lc17, "Copenhagen Tivoli", "Copenhagen Tivoli"); GeoPoint pr18 = new GeoPoint((int) (55.6779738*1E6), (int) (12.5978009*1E6)); OverlayItem overlayitem75 = new OverlayItem(pr18, "Resturant Noma", "Resturant Noma"); GeoPoint dtc24 = new GeoPoint((int) (55.6747595*1E6), (int) (12.565412*1E6)); OverlayItem overlayitem76 = new OverlayItem(dtc24, "The Paul Resturant", "The Paul Resturant"); GeoPoint un17 = new GeoPoint((int) (55.678742*1E6), (int) (12.5841987*1E6)); OverlayItem overlayitem77 = new OverlayItem(un17, "Restaurant Kong Hans Kælder", "Restaurant Kong Hans Kælder"); GeoPoint lc18 = new GeoPoint((int) (55.66787989681918*1E6), (int) (12.584280967712402*1E6)); OverlayItem overlayitem78 = new OverlayItem(lc18, "Radisson Blu Scandinavia Hotel Copenhagen", "Radisson Blu Scandinavia Hotel Copenhagen"); GeoPoint pr19 = new GeoPoint((int) (55.68151324*1E6), (int) (12.5929088*1E6)); OverlayItem overlayitem79 = new OverlayItem(pr19, "Copenhagen Admiral Hotel", "Copenhagen Admiral Hotel"); GeoPoint dtc25 = new GeoPoint((int) (55.6786431*1E6), (int) (12.566237*1E6)); OverlayItem overlayitem80 = new OverlayItem(dtc25, "Hotel Fox", "Hotel Fox"); GeoPoint dtc26 = new GeoPoint((int) (45.46419413386295*1E6), (int) (9.190621376037598*1E6)); OverlayItem overlayitem81 = new OverlayItem(dtc26, "Duomo of Milan", "Duomo of Milan"); GeoPoint un18 = new GeoPoint((int) (45.46730552025704*1E6), (int) (9.189741611480713*1E6)); OverlayItem overlayitem82 = new OverlayItem(un18, "La Scala Theatre", "La Scala Theatre"); GeoPoint lc19 = new GeoPoint((int) (45.469401000526105*1E6), (int) (9.180772304534912*1E6)); OverlayItem overlayitem83 = new OverlayItem(lc19, "Sforzesco Castle", "Sforzesco Castle"); GeoPoint pr20 = new GeoPoint((int) (45.4571409*1E6), (int) (9.184143*1E6)); OverlayItem overlayitem84 = new OverlayItem(pr20, "SHU Café", "SHU Café"); GeoPoint dtc27 = new GeoPoint((int) (45.4774833*1E6), (int) (9.1879434*1E6)); OverlayItem overlayitem84b = new OverlayItem(dtc27, "Rangoli Resturant", "Rangoli Resturant"); GeoPoint un19 = new GeoPoint((int) (45.4728739*1E6), (int) (9.1925647*1E6)); OverlayItem overlayitem85 = new OverlayItem(un19, "Hotel Cavour", "Hotel Cavour"); GeoPoint lc20 = new GeoPoint((int) (45.4833898*1E6), (int) (9.203065*1E6)); OverlayItem overlayitem86 = new OverlayItem(lc20, " Hotel Augustus Milano", " Hotel Augustus Milano"); GeoPoint pr21 = new GeoPoint((int) (52.521104203431*1E6), (int) (13.409993648529053*1E6)); OverlayItem overlayitem87 = new OverlayItem(pr21, "Berliner Fernsehturm", "Berliner Fernsehturm"); GeoPoint dtc28 = new GeoPoint((int) (52.5024116*1E6), (int) (13.3407873*1E6)); OverlayItem overlayitem88 = new OverlayItem(dtc28, "KaDeWe", "KaDeWe"); GeoPoint dtc29 = new GeoPoint((int) (52.5024116*1E6), (int) (13.3407873*1E6)); OverlayItem overlayitem89 = new OverlayItem(dtc29, "Sony Center Berlin", "Sony Center Berlin"); GeoPoint un20 = new GeoPoint((int) (52.5167268*1E6), (int) (13.3811334*1E6)); OverlayItem overlayitem90 = new OverlayItem(un20, "Hotel Adlon Kempinski", "Hotel Adlon Kempinski"); GeoPoint lc21 = new GeoPoint((int) (47.3790239*1E6), (int) (8.5410038*1E6)); OverlayItem overlayitem91 = new OverlayItem(lc21, "Swiss National Museum", "Swiss National Museum"); GeoPoint pr22 = new GeoPoint((int) (47.37522381*1E6), (int) (8.5480097*1E6)); OverlayItem overlayitem92 = new OverlayItem(pr22, "Zoological Museum Zurich", "Zoological Museum Zurich"); GeoPoint dtc30 = new GeoPoint((int) (47.3646155*1E6), (int) (8.5341921*1E6)); OverlayItem overlayitem93 = new OverlayItem(dtc30, "Alden Hotel Splügenschloss", "Alden Hotel Splügenschloss"); GeoPoint un21 = new GeoPoint((int) (47.3673009*1E6), (int) (8.5393579*1E6)); OverlayItem overlayitem94 = new OverlayItem(un21, "Baur au Lac Hotel", "Baur au Lac Hotel"); GeoPoint lc22 = new GeoPoint((int) (47.3724962*1E6), (int) (8.5397697*1E6)); OverlayItem overlayitem95 = new OverlayItem(lc22, "Widder Hotel", "Widder Hotel"); GeoPoint pr23 = new GeoPoint((int) (47.3519342*1E6), (int) (8.5611453*1E6)); OverlayItem overlayitem96 = new OverlayItem(pr23, "Blaue Ente Resturant", "Blaue Ente Resturant"); GeoPoint dtc31 = new GeoPoint((int) (47.384317*1E6), (int) (8.5301602*1E6)); OverlayItem overlayitem97 = new OverlayItem(dtc31, "El Parador Resturant", "El Parador Resturant"); GeoPoint dtc32 = new GeoPoint((int) (50.1154854*1E6), (int) (8.6712932*1E6)); OverlayItem overlayitem98 = new OverlayItem(dtc32, "Resturant Charlot", "Resturant Chalot"); GeoPoint un22 = new GeoPoint((int) (50.113269*1E6), (int) (8.6655786*1E6)); OverlayItem overlayitem99 = new OverlayItem(un22, "Restaurant Alte Kanzlei", "Restaurant Alte Kanzlei"); GeoPoint lc23 = new GeoPoint((int) (50.1079716*1E6), (int) (8.6616355*1E6)); OverlayItem overlayitem100 = new OverlayItem(lc23, "Steigenberger Hotel Metropolitan", "Steigenberger Hotel Metropolitan"); GeoPoint pr24 = new GeoPoint((int) (50.1079054*1E6), (int) (8.6614363*1E6)); OverlayItem overlayitem101 = new OverlayItem(pr24, "InterCityHotel Frankfurt", "InterCityHotel Frankfurt"); GeoPoint dtc33 = new GeoPoint((int) (50.118211*1E6), (int) (8.6267511*1E6)); OverlayItem overlayitem102 = new OverlayItem(dtc33, "Radisson Blu Frankfurt", "Radisson Blu Frankfurt"); GeoPoint un23 = new GeoPoint((int) (50.1173658*1E6), (int) (8.6525491*1E6)); OverlayItem overlayitem103 = new OverlayItem(un23, "Senckenberg Natural History Museum", "Senckenberg Natural History Museum"); GeoPoint lc24 = new GeoPoint((int) (60.14791385553872*1E6), (int) (24.986085891723633*1E6)); OverlayItem overlayitem104 = new OverlayItem(lc24, "Suomenlinna Fortress", "Suomenlinna Fortress"); GeoPoint pr25= new GeoPoint((int) (60.17486121440947*1E6), (int) (24.93196964263916*1E6)); OverlayItem overlayitem105 = new OverlayItem(pr25, "National Museum of Finland", "National Museum of Finland"); GeoPoint dtc34 = new GeoPoint((int) (60.17251327443952*1E6), (int) (24.92527484893799*1E6)); OverlayItem overlayitem106 = new OverlayItem(dtc34, "Temppeliaukio Church", "Temppeliaukio Church"); GeoPoint dtc35 = new GeoPoint((int) (60.1661015*1E6), (int) (24.9462893*1E6)); OverlayItem overlayitem107 = new OverlayItem(dtc35, "Resturant Chez Dominique", "Resturant Chez Dominique"); GeoPoint un24 = new GeoPoint((int) (60.1667065*1E6), (int) (24.9370801*1E6)); OverlayItem overlayitem108 = new OverlayItem(un24, "Lappi Resturant", "Lappi Resturant"); GeoPoint lc25 = new GeoPoint((int) (60.1658221*1E6), (int) (24.9643121*1E6)); OverlayItem overlayitem109 = new OverlayItem(lc25, "Scandic Grand Marina", "Scandic Grand Marina"); GeoPoint pr26 = new GeoPoint((int) (60.1620404*1E6), (int) (24.91947054862976*1E6)); OverlayItem overlayitem110 = new OverlayItem(pr26, "Radisson SAS Royal Hotel Helsinki", "Radisson SAS Royal Hotel Helsinki"); GeoPoint dtc36 = new GeoPoint((int) (50.0890201*1E6), (int) (14.3953924*1E6)); OverlayItem overlayitem111 = new OverlayItem(dtc36, "Prague Castle", "Prague Castle"); GeoPoint un25 = new GeoPoint((int) (50.0791783*1E6), (int) (14.430561*1E6)); OverlayItem overlayitem112 = new OverlayItem(un25, "Czech National Museum", "Czech National Museum"); GeoPoint lc26 = new GeoPoint((int) (50.0867185*1E6), (int) (14.4203544*1E6)); OverlayItem overlayitem113 = new OverlayItem(lc26, "Prague Astronomical Clock", "Prague Astronomical Clock"); GeoPoint pr27 = new GeoPoint((int) (50.0847624*1E6), (int) (14.4181824*1E6)); OverlayItem overlayitem114 = new OverlayItem(pr27, "Flambee Restaurant", "Flambee Restaurant"); GeoPoint dtc37 = new GeoPoint((int) (50.0870934*1E6), (int) (14.4082526*1E6)); OverlayItem overlayitem115 = new OverlayItem(dtc37, "Kampa Park Restaurant", "Kampa Park Restaurant"); GeoPoint dtc38 = new GeoPoint((int) (50.0840176*1E6), (int) (14.4251538*1E6)); OverlayItem overlayitem116 = new OverlayItem(dtc38, "Hotel Ambassador-Zlatá Husa", "Hotel Ambassador-Zlatá Husa"); GeoPoint un26 = new GeoPoint((int) (50.0819621*1E6), (int) (50.0819621*1E6)); OverlayItem overlayitem117 = new OverlayItem(un26, "Hotel Galileo", "Hotel Galileo"); itemizedoverlay.addOverlay(overlayitem); itemizedoverlay.addOverlay(overlayitem2); itemizedoverlay.addOverlay(overlayitem3); itemizedoverlay.addOverlay(overlayitem4); itemizedoverlay.addOverlay(overlayitem5); itemizedoverlay.addOverlay(overlayitem6); itemizedoverlay.addOverlay(overlayitem7); itemizedoverlay.addOverlay(overlayitem8); itemizedoverlay.addOverlay(overlayitem9); itemizedoverlay.addOverlay(overlayitem10); itemizedoverlay.addOverlay(overlayitem11); itemizedoverlay.addOverlay(overlayitem12); itemizedoverlay.addOverlay(overlayitem13); itemizedoverlay.addOverlay(overlayitem14); itemizedoverlay.addOverlay(overlayitem15); itemizedoverlay.addOverlay(overlayitem16); itemizedoverlay.addOverlay(overlayitem17); itemizedoverlay.addOverlay(overlayitem18); itemizedoverlay.addOverlay(overlayitem19); itemizedoverlay.addOverlay(overlayitem20); itemizedoverlay.addOverlay(overlayitem21); itemizedoverlay.addOverlay(overlayitem22); itemizedoverlay.addOverlay(overlayitem23); itemizedoverlay.addOverlay(overlayitem24); itemizedoverlay.addOverlay(overlayitem25); itemizedoverlay.addOverlay(overlayitem26); itemizedoverlay.addOverlay(overlayitem27); itemizedoverlay.addOverlay(overlayitem28); itemizedoverlay.addOverlay(overlayitem29); itemizedoverlay.addOverlay(overlayitem30); itemizedoverlay.addOverlay(overlayitem31); itemizedoverlay.addOverlay(overlayitem32); itemizedoverlay.addOverlay(overlayitem33); itemizedoverlay.addOverlay(overlayitem34); itemizedoverlay.addOverlay(overlayitem35); itemizedoverlay.addOverlay(overlayitem36); itemizedoverlay.addOverlay(overlayitem37); itemizedoverlay.addOverlay(overlayitem38); itemizedoverlay.addOverlay(overlayitem39); itemizedoverlay.addOverlay(overlayitem40); itemizedoverlay.addOverlay(overlayitem41); itemizedoverlay.addOverlay(overlayitem42); itemizedoverlay.addOverlay(overlayitem43); itemizedoverlay.addOverlay(overlayitem44); itemizedoverlay.addOverlay(overlayitem45); itemizedoverlay.addOverlay(overlayitem46); itemizedoverlay.addOverlay(overlayitem47); itemizedoverlay.addOverlay(overlayitem48); itemizedoverlay.addOverlay(overlayitem49); itemizedoverlay.addOverlay(overlayitem50); itemizedoverlay.addOverlay(overlayitem51); itemizedoverlay.addOverlay(overlayitem52); itemizedoverlay.addOverlay(overlayitem53); itemizedoverlay.addOverlay(overlayitem54); itemizedoverlay.addOverlay(overlayitem55); itemizedoverlay.addOverlay(overlayitem56); itemizedoverlay.addOverlay(overlayitem57); itemizedoverlay.addOverlay(overlayitem58); itemizedoverlay.addOverlay(overlayitem59); itemizedoverlay.addOverlay(overlayitem60); itemizedoverlay.addOverlay(overlayitem61); itemizedoverlay.addOverlay(overlayitem62); itemizedoverlay.addOverlay(overlayitem63); itemizedoverlay.addOverlay(overlayitem64); itemizedoverlay.addOverlay(overlayitem65); itemizedoverlay.addOverlay(overlayitem66); itemizedoverlay.addOverlay(overlayitem67); itemizedoverlay.addOverlay(overlayitem68); itemizedoverlay.addOverlay(overlayitem69); itemizedoverlay.addOverlay(overlayitem70); itemizedoverlay.addOverlay(overlayitem71); itemizedoverlay.addOverlay(overlayitem72); itemizedoverlay.addOverlay(overlayitem73); itemizedoverlay.addOverlay(overlayitem74); itemizedoverlay.addOverlay(overlayitem75); itemizedoverlay.addOverlay(overlayitem76); itemizedoverlay.addOverlay(overlayitem77); itemizedoverlay.addOverlay(overlayitem78); itemizedoverlay.addOverlay(overlayitem79); itemizedoverlay.addOverlay(overlayitem80); itemizedoverlay.addOverlay(overlayitem81); itemizedoverlay.addOverlay(overlayitem82); itemizedoverlay.addOverlay(overlayitem83); itemizedoverlay.addOverlay(overlayitem84); itemizedoverlay.addOverlay(overlayitem84b); itemizedoverlay.addOverlay(overlayitem85); itemizedoverlay.addOverlay(overlayitem86); itemizedoverlay.addOverlay(overlayitem87); itemizedoverlay.addOverlay(overlayitem88); itemizedoverlay.addOverlay(overlayitem89); itemizedoverlay.addOverlay(overlayitem90); itemizedoverlay.addOverlay(overlayitem91); itemizedoverlay.addOverlay(overlayitem92); itemizedoverlay.addOverlay(overlayitem93); itemizedoverlay.addOverlay(overlayitem94); itemizedoverlay.addOverlay(overlayitem95); itemizedoverlay.addOverlay(overlayitem96); itemizedoverlay.addOverlay(overlayitem97); itemizedoverlay.addOverlay(overlayitem98); itemizedoverlay.addOverlay(overlayitem99); itemizedoverlay.addOverlay(overlayitem100); itemizedoverlay.addOverlay(overlayitem101); itemizedoverlay.addOverlay(overlayitem102); itemizedoverlay.addOverlay(overlayitem103); itemizedoverlay.addOverlay(overlayitem104); itemizedoverlay.addOverlay(overlayitem105); itemizedoverlay.addOverlay(overlayitem106); itemizedoverlay.addOverlay(overlayitem107); itemizedoverlay.addOverlay(overlayitem108); itemizedoverlay.addOverlay(overlayitem109); itemizedoverlay.addOverlay(overlayitem110); itemizedoverlay.addOverlay(overlayitem111); itemizedoverlay.addOverlay(overlayitem112); itemizedoverlay.addOverlay(overlayitem113); itemizedoverlay.addOverlay(overlayitem114); itemizedoverlay.addOverlay(overlayitem115); itemizedoverlay.addOverlay(overlayitem116); itemizedoverlay.addOverlay(overlayitem
不幸的是,Android Google Maps API不提供标记/图钉的信息窗口。你必须自己写。但是,有实现它的第三方开源“库”,可在此处找到:
http://github.com/jgilfelt/android- mapviewballoons