开发者

how to add a marker to basicComponentMap from given coordinates with Nutiteq package?

How to add a marker to BasicComponentMap from given coordinates using the Nutiteq package. Its quite easy to add a marker if using the current user location, but I want to set a开发者_运维百科 marker in a given location from longitude and latitude.

Thanks.


I have found a way:

    try {
        Image poiImage = Image.createImage("/res/drawable/gps_marker.png");
        PlaceLabel poiLabel =new PlaceLabel("location");
        Place p = new Place(1, poiLabel, poiImage, lon, lat);
        mapComponent.addPlace(p);
    } catch (IOException e) {
        Log.d("MAPA", "Couldn't location marker image.");
    }

Where mapComponent is BasicMapComponent.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜