WEB开发网
开发学院手机开发Android 开发 Android系列只androidGooglemap小应用 阅读

Android系列只androidGooglemap小应用

 2010-08-19 14:32:00 来源:WEB开发网   
核心提示:bubbleIcon = BitmapFactory.decodeResource(mapLocationViewer.getResources(),R.drawable.bubble); 24 bubbleVolume = BitmapFactory.decodeResource(mapLocationViewer.
bubbleIcon = BitmapFactory.decodeResource(mapLocationViewer.getResources(),R.drawable.bubble); 24 bubbleVolume = BitmapFactory.decodeResource(mapLocationViewer.getResources(),R.drawable.bubble_volume); 25 bubbleVolumeOff = BitmapFactory.decodeResource(mapLocationViewer.getResources(),R.drawable.bubble_volumeoff); 26 bubbleVibrate = BitmapFactory.decodeResource(mapLocationViewer.getResources(),R.drawable.bubble_vibrate); 27 bubbleVolumeeVibrate = BitmapFactory.decodeResource(mapLocationViewer.getResources(),R.drawable.bubble_volumevibrate); 28 shadowIcon = BitmapFactory.decodeResource(mapLocationViewer.getResources(),R.drawable.shadow); 29 } 30 31 @Override 32 public boolean onTap(GeoPoint p, MapView mapView) { 33 34 // Store whether prior popup was displayed so we can call invalidate() & remove it if necessary. 35 boolean isRemovePriorPopup = selectedMapLocation != null; 36 37 // Next test whether a new popup should be displayed 38 selectedMapLocation = getHitMapLocation(mapView,p); 39 if ( isRemovePriorPopup || selectedMapLocation != null) { 40 if(selectedMapLocation==null){ 41 //发送消息 42 Message msg = mHandler.obtainMessage(); 43 msg.what = RingMaster.REFERSH_LOCATION; 44 Bundle b = new Bundle(); 45 b.putInt("view",android.view.View.GONE); 46 msg.setData(b); 47 mHandler.sendMessage(msg); 48 }else{ 49 //发送消息 50 Message msg = mHandler.obtainMessage(); 51 msg.what = RingMaster.REFERSH_LOCATION; 52 Bundle b = new Bundle(); 53 b.putString("location", selectedMapLocation.getLocation_Id()); 54 //b.putString("ringmode", selectedMapLocation.getLocation_ring()); 55 b.putDouble("latitude", selectedMapLocation.getLocation_latitude()); 56 b.putDouble("longitude", selectedMapLocation.getLocation_longitude()); 57 b.putInt("view", android.view.View.VISIBLE); 58 msg.setData(b); 59 mHandler.sendMessage(msg); 60 61 mapView.getController().animateTo(p); 62 mapView.invalidate(); 63 64 } 65 } 66 67 // Lastly return true if we handled this onTap() 68 return

上一页  4 5 6 7 8 9 10 11 12  下一页

Tags:Android 系列 androidGooglemap

编辑录入:coldstar [复制链接] [打 印]
赞助商链接