j2me +谷歌地图+街景

时间:2011-04-22 09:37:03

标签: java java-me

我曾经用过 http://www.jappit.com/blog/midmaps-google-maps-java-me-library/

我找到了两个位置之间的路径。 我在以下代码的帮助下完成了这项工作: -

 GoogleMapsPath path = new GoogleMapsPath(); 
path.addPoint(new GoogleMapsCoordinates(41.8954656, 12.4823243)); 
path.addPoint(new GoogleMapsCoordinates(41.8934656, 12.4833243)); 
path.addPoint(new GoogleMapsCoordinates(41.8944656, 12.4843243)); path.setColor(GoogleStaticMap.COLOR_RED);
 path.setWeight(10); map.addPath(path);
 GoogleMapsPath bluePath = new
 GoogleMapsPath();
 bluePath.addPoint(new GoogleMapsCoordinates(41.8954656, 12.4823243)); bluePath.addPoint(new GoogleMapsCoordinates(41.8954656, 12.4823243)); bluePath.addPoint(new GoogleMapsCoordinates(41.8954656, 12.4823243)); bluePath.setColor(GoogleStaticMap.COLOR_BLUE);
 bluePath.setFillColor(GoogleStaticMap.COLOR_GREEN);
 bluePath.setWeight(5);
 map.addPath(bluePath);

我得到的结果是连接两个位置的地图上绘制的直线。 现在我想绘制一条线来显示街景上的路线,并获得它们之间的距离。

0 个答案:

没有答案