小编Roy*_*sef的帖子

为什么我们的服务器从我们的Android应用程序接收CONNECT方法请求而我们的代码中没有使用它?

一些用户抱怨网络问题.我们的Android应用程序通过https与我们的服务器通信.

我们的Apache日志显示了状态响应; "405方法不允许(CONNECT)",此问题仅在特定IP地址上重现.

我不明白为什么Android应用程序试图通过CONNECT方法到达服务器,我从不在应用程序中使用此方法,我只使用GET,POST或PUT.

似乎代理可能涉及该问题,但我不知道如何解决它.有人知道吗 ?

https android http http-status-code-405

16
推荐指数
2
解决办法
1003
查看次数

在Google Maps Android API v2中对折线进行触摸检测

我想touchListener在使用Google Maps V2 Android API显示的折线上实现一个.

缩放级别: CameraUpdate cameraUpdate = CameraUpdateFactory.newLatLngZoom(lat_Lng, 5);

我尝试了以下折线触摸代码:

boolean onpoly = false;
            for (Polyline polyline : mPolylines) {
                for (LatLng polyCoords : polyline.getPoints()) {
                    float[] results = new float[1];

                    Location.distanceBetween(points.latitude, points.longitude, polyCoords.latitude, polyCoords.longitude, results);

                    if (results[0] < 100 ) {
                        onpoly = true;

                        Marker mark = map.addMarker(new MarkerOptions().position(points).title("AddEvent")

                        .snippet("" + addressaddexpense).icon(BitmapDescriptorFactory.fromResource(R.drawable.addicon)));

                        UtilsClass.dropPinEffect(mark);
                    }// end if..
                } // end for loop
            }// end for loop

            if (onpoly == true) {
                Toast.makeText(getActivity(), "Poly line detected", Toast.LENGTH_SHORT).show(); …
Run Code Online (Sandbox Code Playgroud)

android google-maps-api-2 google-polyline

13
推荐指数
1
解决办法
1768
查看次数