多纬度长期使用地理在Android的默认谷歌地图纬度、地理、地图、Android

由网友(动心致病↘动情致命)分享简介:我用下面的code。使用显示在默认谷歌地图上的位置地理 I'm using following code to display location on default google map using geoUri uri = Uri.parse("geo:"+Global.detail_lat+","+Global...

我用下面的code。使用显示在默认谷歌地图上的位置地理

I'm using following code to display location on default google map using geo

 Uri uri = Uri.parse("geo:"+Global.detail_lat+","+Global.detail_long+"?q="+Global.detail_lat+","+Global.detail_long+"");
 Intent in = new Intent(Intent.ACTION_VIEW, uri);
 startActivity(in);

其工作的罚款。现在我想知道的是,我可以显示使用地理多个位置(经纬度多长),在默认的地图?我可以通过数组或别的什么吗?

Its working fine. Now i wanna know that, can i display multiple locations (multiple lat,long) on default map using geo? can i pass array or anything else?

谢谢, 杰伊·帕特尔

推荐答案

您可以做到这一点,你需要有它的SDK来为Android中显示多个商标在谷歌地图,你可以从这里下载该SDK。 SDK

You can do this, for that you need to have SDK which comes for displaying multiple marks at Google Maps in Android and you can download that SDK from here. SDK

在这里你可以找到关于如何显示,超过三分之一的谷歌Android地图商标

And here you can find complete guide on HOW TO SHOW MORE THAN ONE MARKS IN ANDROID GOOGLE MAP

在以下级阵列已通过了不同的位置

In below class array has been passed for different location

public void drawMalls(){
Drawable marker = getResources().getDrawable(R.drawable.malls);
MallOverlay mallsPos = new MallOverlay(marker,mapView);
    GeoPoint[] mallCoords = new GeoPoint[6];

    //Load Some Random Coordinates in Miami, FL
    mallCoords[0] = new GeoPoint(29656582,-82411151);//The Oaks Mall
    mallCoords[1] = new GeoPoint(29649831,-82376347);//Creekside mall
    mallCoords[2] = new GeoPoint(29674146,-8238905);//Millhopper Shopping Center
    mallCoords[3] = new GeoPoint(29675078,-82322617);//Northside Shopping Center
    mallCoords[4] = new GeoPoint(29677017,-82339761);//Gainesville Mall
    mallCoords[5] = new GeoPoint(29663835,-82325599);//Gainesville Shopping Center      

    List<Overlay> overlays = mapView.getOverlays();
OverlayItem overlayItem = new OverlayItem(mallCoords[0], "The Oaks Mall", "6419 W Newberry Rd, Gainesville, FL 32605");
mallsPos.addOverlay(overlayItem);
overlayItem = new OverlayItem(mallCoords[1], "Creekside Mall", "3501 Southwest 2nd Avenue, Gainesville, FL");
mallsPos.addOverlay(overlayItem);
overlayItem = new OverlayItem(mallCoords[2], "Millhopper Shopping Center", "NW 43rd St & NW 16th Blvd. Gainesville, FL");
mallsPos.addOverlay(overlayItem);
overlayItem = new OverlayItem(mallCoords[3], "Northside Shopping Center", "Gainesville, FL");
mallsPos.addOverlay(overlayItem);
overlayItem = new OverlayItem(mallCoords[4], "Gainesville Mall", "2624 Northwest 13th Street Gainesville, FL 32609-2834");
mallsPos.addOverlay(overlayItem);
overlayItem = new OverlayItem(mallCoords[5], "Gainesville Shopping Center", "1344 N Main St Gainesville, Florida 32601");
mallsPos.addOverlay(overlayItem);
overlays.add(mallsPos); 

mallsPos.setCurrentLocation(currentLocation);

}

阅读全文

相关推荐

最新文章