小编Kum*_*uri的帖子

使用android google maps v2添加标记到地图的代码

我有来自database.how的lat和long值,使用android google map api v2显示基于lat和long值的标记.在原始的android google地图中,我们根据概念itemoverlay显示标记.在v2中,我不知道如何显示标记.

    dbAdapter.open();
        Cursor points = dbAdapter.clustercall(Btmlft_latitude, toprgt_latitude,
                Btmlft_longitude, toprgt_longitude, gridsize1);
        int c = points.getCount();
        Log.d("count of points", "" + c);

        if (points != null) {
            if (points.moveToFirst()) {
                do {

                    int latitude = (int) (points.getFloat(points
                            .getColumnIndex("LATITUDE")) * 1E6);
                    int longitude = (int) (points.getFloat(points
                            .getColumnIndex("LONGITUDE")) * 1E6);

                    mapView.addMarker(new MarkerOptions().position(
                            new LatLng(latitude, longitude)).icon(
                            BitmapDescriptorFactory.defaultMarker()));

                } while (points.moveToNext());

            }
        }
        points.close();
        dbAdapter.close();
Run Code Online (Sandbox Code Playgroud)

那是mycode.我从数据库获取lat和long值,但是如何根据lat和long值添加标记来映射.

我阅读了android google maps api v2.In,它只提供了静态添加的标记数据

android google-maps-android-api-2

14
推荐指数
2
解决办法
8万
查看次数

在 git jenkins 中找不到存储库

在此处输入图片说明

我正在使用安装了最新插件的 jenkins 2.64。

我正在尝试在 jenkins 中设置 git repo 并提供凭据,但给出错误无法连接状态代码为 128 的存储库。

Cloning repository https://github.com/somerepository.git
 > git init /Users/kumar/.jenkins/workspace/sample # timeout=10
Fetching upstream changes from https://github.com/somerepository.git
 > git --version # timeout=10
using GIT_ASKPASS to set credentials 
 > git fetch --tags --progress https://github.com/somerepository.git +refs/heads/*:refs/remotes/origin/*
ERROR: Error cloning remote repo 'origin'
hudson.plugins.git.GitException: Command "git fetch --tags --progress https://github.com/somerepository.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
stdout: 
stderr: remote: Repository not found.
fatal: repository 'https://github.com/somerepository.git/' not found

    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1903)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1622)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:71)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:348)
    at …
Run Code Online (Sandbox Code Playgroud)

git macos jenkins

7
推荐指数
1
解决办法
9685
查看次数

android google maps v2的内存不足异常

当我在地图上添加和删除标记时,一段时间后应用程序崩溃,并显示内存异常消息.

logcat响应是:

02-21 06:04:27.670: E/AndroidRuntime(1892): FATAL EXCEPTION: vts_com.rapidBizApps.mapamine
02-21 06:04:27.670: E/AndroidRuntime(1892): java.lang.OutOfMemoryError
02-21 06:04:27.670: E/AndroidRuntime(1892):     at maps.bb.d.a(Unknown Source)
02-21 06:04:27.670: E/AndroidRuntime(1892):     at maps.s.ap.a(Unknown Source)
02-21 06:04:27.670: E/AndroidRuntime(1892):     at maps.ak.r.a(Unknown Source)
02-21 06:04:27.670: E/AndroidRuntime(1892):     at maps.ak.e.a(Unknown Source)
02-21 06:04:27.670: E/AndroidRuntime(1892):     at maps.ak.e.a(Unknown Source)
02-21 06:04:27.670: E/AndroidRuntime(1892):     at maps.ak.o.handleMessage(Unknown Source)
02-21 06:04:27.670: E/AndroidRuntime(1892):     at android.os.Handler.dispatchMessage(Handler.java:99)
02-21 06:04:27.670: E/AndroidRuntime(1892):     at android.os.Looper.loop(Looper.java:130)
02-21 06:04:27.670: E/AndroidRuntime(1892):     at maps.ak.e.j_(Unknown Source)
02-21 06:04:27.670: E/AndroidRuntime(1892):     at maps.ak.ad.j_(Unknown Source)
02-21 06:04:27.670: E/AndroidRuntime(1892):     at maps.bb.l.b(Unknown Source)
02-21 06:04:27.670: E/AndroidRuntime(1892):     at …
Run Code Online (Sandbox Code Playgroud)

android google-maps-android-api-2

5
推荐指数
1
解决办法
5658
查看次数

标签 统计

android ×2

google-maps-android-api-2 ×2

git ×1

jenkins ×1

macos ×1