当前位置: 首页>>代码示例>>Java>>正文


Java ExtendedOverlayItem类代码示例

本文整理汇总了Java中org.osmdroid.bonuspack.overlays.ExtendedOverlayItem的典型用法代码示例。如果您正苦于以下问题:Java ExtendedOverlayItem类的具体用法?Java ExtendedOverlayItem怎么用?Java ExtendedOverlayItem使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ExtendedOverlayItem类属于org.osmdroid.bonuspack.overlays包,在下文中一共展示了ExtendedOverlayItem类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: putMarkerItem

import org.osmdroid.bonuspack.overlays.ExtendedOverlayItem; //导入依赖的package包/类
/**
 * add (or replace) an item in markerOverlays. p position.
 */
public ExtendedOverlayItem putMarkerItem(ExtendedOverlayItem item,
		GeoPoint p, int index, int titleResId, int markerResId,
		int iconResId) {
	if (item != null) {
		itineraryMarkers.removeItem(item);
	}
	Drawable marker = getResources().getDrawable(markerResId);
	String title = getResources().getString(titleResId);
	ExtendedOverlayItem overlayItem = new ExtendedOverlayItem(title, "", p,
			this);
	overlayItem.setMarkerHotspot(OverlayItem.HotspotPlace.BOTTOM_CENTER);
	overlayItem.setMarker(marker);
	if (iconResId != -1)
		overlayItem.setImage(getResources().getDrawable(iconResId));
	overlayItem.setRelatedObject(index);
	itineraryMarkers.addItem(overlayItem);
	mv.invalidate();
	// Start geocoding task to update the description of the marker with its
	// address:
	new GeocodingTask().execute(overlayItem);
	return overlayItem;
}
 
开发者ID:nirabpudasaini,项目名称:Mero-Bhada-Meter,代码行数:26,代码来源:MapActivity.java

示例2: putRoadNodes

import org.osmdroid.bonuspack.overlays.ExtendedOverlayItem; //导入依赖的package包/类
private void putRoadNodes(Road road) {
	roadNodeMarkers.removeAllItems();
	Drawable marker = getResources().getDrawable(R.drawable.marker_node);
	int n = road.mNodes.size();
	TypedArray iconIds = getResources().obtainTypedArray(
			R.array.direction_icons);
	for (int i = 0; i < n; i++) {
		RoadNode node = road.mNodes.get(i);
		String instructions = (node.mInstructions == null ? ""
				: node.mInstructions);
		ExtendedOverlayItem nodeMarker = new ExtendedOverlayItem("Step "
				+ (i + 1), instructions, node.mLocation, this);
		nodeMarker.setSubDescription(road.getLengthDurationText(
				node.mLength, node.mDuration));
		nodeMarker.setMarkerHotspot(OverlayItem.HotspotPlace.CENTER);
		nodeMarker.setMarker(marker);
		int iconId = iconIds.getResourceId(node.mManeuverType,
				R.drawable.ic_empty);
		if (iconId != R.drawable.ic_empty) {
			Drawable icon = getResources().getDrawable(iconId);
			nodeMarker.setImage(icon);
		}
		roadNodeMarkers.addItem(nodeMarker);
	}
}
 
开发者ID:nirabpudasaini,项目名称:Mero-Bhada-Meter,代码行数:26,代码来源:MapActivity.java

示例3: WikiArticlesOverlay

import org.osmdroid.bonuspack.overlays.ExtendedOverlayItem; //导入依赖的package包/类
public WikiArticlesOverlay(
		final Drawable pDefaultMarker,
		final Context pContext,
		final long _trackId
		)
{
	super(pDefaultMarker, new DefaultResourceProxyImpl(pContext));
	this.trackId = _trackId;
	this.pContentResolver = pContext.getContentResolver();
       waypoints = new ArrayList<GeoPoint>();
       listItems = new ArrayList<ExtendedOverlayItem>();
	
}
 
开发者ID:WanderWiki,项目名称:WanderWiki-client,代码行数:14,代码来源:WikiArticlesOverlay.java

示例4: onPostExecute

import org.osmdroid.bonuspack.overlays.ExtendedOverlayItem; //导入依赖的package包/类
@Override
protected void onPostExecute(List<POI> pois) {
    	mWaitSpinner.cancel();
        if (mTag.equals("")) {
                //no search, no message
        } else if (pois == null) {
                Toast
                                .makeText(mContext.getApplicationContext(),
                                                "Technical issue when getting " + mTag + " POI.", Toast.LENGTH_LONG)
                                .show();
        } else {
                Toast.makeText(mContext.getApplicationContext(),
                                "" + pois.size() + " " + mTag + " entries found",
                                Toast.LENGTH_LONG).show();
                //        if (mTag.equals("flickr") || mTag.startsWith("picasa") || mTag.equals("wikipedia"))
                //        startAsyncThumbnailsLoading(mPOIs);
        }
       //super.onPostExecute(pois);
       
	for (POI poi:pois){
		Log.d("Alain ", "item locationE6 lat=" + poi.mLocation.getLatitudeE6() + " long=" + poi.mLocation.getLongitudeE6());
        ExtendedOverlayItem poiItem = new ExtendedOverlayItem(
                                poi.mType, poi.mDescription, 
                                poi.mLocation, mMapView.getContext());
        Drawable poiMarker = mContext.getResources().getDrawable(R.drawable.pin_default);
        poiItem.setMarker(poiMarker);
        poiItem.setMarkerHotspot(OverlayItem.HotspotPlace.CENTER);
        if (poi.mThumbnail != null){
                poiItem.setImage(new BitmapDrawable(poi.mThumbnail));
        }
		final ArrayList<ExtendedOverlayItem> poiItems = new ArrayList<ExtendedOverlayItem>();
		ItemizedOverlayWithBubble<ExtendedOverlayItem> poiMarkers = new ItemizedOverlayWithBubble<ExtendedOverlayItem>(
				mContext, poiItems, mMapView, new CustomMapInfoWindow(mMapView));
		mMapView.getOverlays().add(poiMarkers);
        poiMarkers.addItem(poiItem);
	}
}
 
开发者ID:alain75007,项目名称:androidschool,代码行数:38,代码来源:POITask.java

示例5: onOpen

import org.osmdroid.bonuspack.overlays.ExtendedOverlayItem; //导入依赖的package包/类
@Override public void onOpen(Object item){
       super.onOpen(item);
       ExtendedOverlayItem eItem = (ExtendedOverlayItem)item;
       urlWikipedia = (String)eItem.getRelatedObject();
}
 
开发者ID:WanderWiki,项目名称:WanderWiki-client,代码行数:6,代码来源:WikiArticlesInfoWindow.java

示例6: onOpen

import org.osmdroid.bonuspack.overlays.ExtendedOverlayItem; //导入依赖的package包/类
@Override public void onOpen(Object item) {
	ExtendedOverlayItem eItem = (ExtendedOverlayItem)item;
	mSelectedPoint = (Integer)eItem.getRelatedObject();
	super.onOpen(item);
}
 
开发者ID:nirabpudasaini,项目名称:Mero-Bhada-Meter,代码行数:6,代码来源:ViaPointInfoWindow.java

示例7: doInBackground

import org.osmdroid.bonuspack.overlays.ExtendedOverlayItem; //导入依赖的package包/类
protected String doInBackground(Object... params) {
	marker = (ExtendedOverlayItem) params[0];
	return getAddress(marker.getPoint());
}
 
开发者ID:nirabpudasaini,项目名称:Mero-Bhada-Meter,代码行数:5,代码来源:MapActivity.java


注:本文中的org.osmdroid.bonuspack.overlays.ExtendedOverlayItem类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。