在Android上使用Google Maps API v2显示路线

5
我正在尝试在Android中显示两个MarkerOptions点之间的驾车路线。我找到了这个教程,对我很有帮助,但我想调整它,使MarkerOptions是我的当前位置和一个固定的LatLng对象,而不是当您触摸地图时得到的两个点。因此,我已经拥有了我的当前位置LatLng = updatedLatLng和固定位置LatLng = wcbcLatLng。在教程中,onMapClick方法如下所示:
    public void onTouchMap(){

    // Setting onclick event listener for the map
    this.mapG3.setOnMapClickListener(new OnMapClickListener() {
        @Override
        public void onMapClick(LatLng point) {
            // Already two locations
            if (Geo4.this.markerPoints.size() > 1) {
                Geo4.this.markerPoints.clear();
                Geo4.this.mapG3.clear();
            }

            // Adding new item to the ArrayList
            Geo4.this.markerPoints.add(point);

            // Creating MarkerOptions
            MarkerOptions options = new MarkerOptions();

            // Setting the position of the marker
            options.position(point);

            /**
             * For the start location, the color of marker is GREEN and for
             * the end location, the color of marker is RED.
             */
            if (Geo4.this.markerPoints.size() == 1) {
                options.icon(BitmapDescriptorFactory
                        .defaultMarker

(BitmapDescriptorFactory.HUE_GREEN));
            } else if (Geo4.this.markerPoints.size() == 2) {
                options.icon(BitmapDescriptorFactory
                        .defaultMarker

(BitmapDescriptorFactory.HUE_RED));
            }

            // Add new marker to the Google Map Android API V2
            Geo4.this.mapG3.addMarker(options);

            // Checks, whether start and end locations are captured
            if (Geo4.this.markerPoints.size() >= 2) {
                LatLng origin = Geo4.this.markerPoints.get(0);
                LatLng dest = Geo4.this.markerPoints.get(1);

                // Getting URL to the Google Directions API
                String url = Geo4.this.getDirectionsUrl(origin, dest);

                DownloadTask downloadTask = new DownloadTask();

                // Start downloading json data from Google Directions API
                downloadTask.execute(url);
            }
        }
    });
}//-- END Method

我想修改这个方法,让它寻找我的updatedLatLngwcbcLatLng,而不是当前使用的LatLng originLatLng dest。任何帮助都将不胜感激!以下是完整的Activity代码:

    import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import org.json.JSONObject;

import android.app.AlertDialog;
import android.content.Intent;
import android.graphics.Color;
import android.location.LocationManager;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;

import com.google.android.gms.common.GooglePlayServicesUtil;
import com.google.android.gms.maps.CameraUpdate;
import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.GoogleMap.OnMapClickListener;
import com.google.android.gms.maps.SupportMapFragment;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.LatLngBounds;
import com.google.android.gms.maps.model.Marker;
import com.google.android.gms.maps.model.MarkerOptions;
import com.google.android.gms.maps.model.PolylineOptions;

import android.location.Criteria;
import android.location.Location;
import android.location.LocationListener;
import android.location.LocationManager;
import android.provider.Settings;

public class Geo4 extends FragmentActivity implements LocationListener {
GoogleMap mapG3;
ArrayList<LatLng> markerPoints;
TextView mapInfo_TV;
LocationManager locMan;
SupportMapFragment sMf;
Button back_btn, zoom_btn;
MarkerOptions startMO, wcbcMO, broncoMO;
MarkerOptions markers;
Marker currentMarker, wcbcMarker, broncoMarker;
LatLng updatedLatLng, directionsLatLng;
LatLng wcbcLatLng = new LatLng(30.393903, -97.682871);
LatLng oskiLatLng = new LatLng(30.474570, -97.973889);
LatLng point, point3t, point4t;
CameraUpdate cameraUpdate;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.geo3);
    back_btn = (Button) findViewById(R.id.backMap_g3_btn);
    zoom_btn = (Button) findViewById(R.id.marker_g3_btn);

    this.mapInfo_TV = (TextView) this.findViewById(R.id.map_g3Info_TV);
    // Initializing
    this.markerPoints = new ArrayList<LatLng>();

    // Getting reference to SupportMapFragment of the activity_main
    sMf = (SupportMapFragment) this.getSupportFragmentManager()
            .findFragmentById(R.id.map_g3_FRAG);

    // Getting Map for the SupportMapFragment
    this.mapG3 = sMf.getMap();

    // --- fire Methods
    googlePlay();
    getCurrentLocation();
    onTouchMap();

    // --- END fire Methods

    // --- Back button
    back_btn.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View arg0) {
            // mapG3.clear();
            Intent backmapI = new Intent(
                    "com.my.package.BUTTON_INTERFACE");
            startActivity(backmapI);

        }
    });
    // --- end Back button

    // --- Zoom button
    zoom_btn.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View arg0) {
            getDirections4T(point4t);
        }
    });
    // --- end Zoom button

}// --- END onCreate

// --- Methods ----

public void googlePlay() {
    // ---- Google Play

    // Getting Google Play availability status
    int status = GooglePlayServicesUtil
            .isGooglePlayServicesAvailable(getBaseContext());

    if (status != ConnectionResult.SUCCESS) { // Google Play Services are
                                                    // not available

        int requestCode = 10;
        Dialog dialog = GooglePlayServicesUtil.getErrorDialog(status, this,
                requestCode);
        dialog.show();

    } else { // Google Play Services are available

        //Toast.makeText(getApplicationContext(),"Services Launched Fo  Sho'",Toast.LENGTH_SHORT).show();
    }
}

// ---- END Method

public void getCurrentLocation(){
    // Getting LocationManager object from System Service LOCATION_SERVICE
    locMan = (LocationManager) getSystemService(LOCATION_SERVICE);
    boolean enabledGPS = locMan
            .isProviderEnabled(LocationManager.GPS_PROVIDER);
    boolean enabledWiFi = locMan
            .isProviderEnabled(LocationManager.NETWORK_PROVIDER);
    // Check if enabled and if not send user to the GPS settings
    if (!enabledGPS && !enabledWiFi) {
        Toast.makeText(getApplicationContext(), "GPS signal not found",
                Toast.LENGTH_LONG).show();
        Intent intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
        startActivity(intent);
    }
    // Creating a criteria object to retrieve provider
    Criteria criteria = new Criteria();

    // Getting the name of the best provider
    String provider = locMan.getBestProvider(criteria, true);

    // Getting Current Location From GPS
    Location oLc = locMan.getLastKnownLocation(provider);
    if (oLc != null) {
        onLocationChanged(oLc);
    }
    locMan.requestLocationUpdates(provider, 20000, 0, this);

}//--- END Method

public void zoomToFit() {
    // --- zoom to fit
    LatLngBounds.Builder builder = new LatLngBounds.Builder();
    builder.include(wcbcLatLng);
    builder.include(updatedLatLng);
    LatLngBounds bounds = builder.build();
    int padding = 50; // offset from edges of the map in pixels
    cameraUpdate = CameraUpdateFactory.newLatLngBounds(bounds, padding);
    mapG3.animateCamera(cameraUpdate);
    // --- END zoom to fit

}// --- END Method

public void addwcbcMarkerOption() {
    wcbcMO = new MarkerOptions().position(wcbcLatLng).title(
    "Destination");
    wcbcMO.icon(BitmapDescriptorFactory
            .defaultMarker(BitmapDescriptorFactory.HUE_VIOLET));
    mapG3.addMarker(wcbcMO);
    cameraUpdate = CameraUpdateFactory.newLatLngZoom(wcbcLatLng, 15);
    mapG3.animateCamera(cameraUpdate);
}// --- END Method

public void getDirections4T(LatLng point4t) {


    Geo4.this.markerPoints.add(point4t);
    markers = new MarkerOptions();
    markers.position(wcbcLatLng);
    markers.position(oskiLatLng);

    if (Geo4.this.markerPoints.size() == 1) {
        markers.icon(BitmapDescriptorFactory
                .defaultMarker(BitmapDescriptorFactory.HUE_GREEN));
    } else if (Geo4.this.markerPoints.size() == 2) {
        markers.icon(BitmapDescriptorFactory
                .defaultMarker(BitmapDescriptorFactory.HUE_RED));
    }
    Geo4.this.mapG3.addMarker(markers);


}//--- END Method

public void onTouchMap(){

    // Setting onclick event listener for the map
    this.mapG3.setOnMapClickListener(new OnMapClickListener() {
        @Override
        public void onMapClick(LatLng point) {
            // Already two locations
            if (Geo4.this.markerPoints.size() > 1) {
                Geo4.this.markerPoints.clear();
                Geo4.this.mapG3.clear();
            }

            // Adding new item to the ArrayList
            Geo4.this.markerPoints.add(point);

            // Creating MarkerOptions
            MarkerOptions options = new MarkerOptions();

            // Setting the position of the marker
            options.position(point);

            /**
             * For the start location, the color of marker is GREEN and for
             * the end location, the color of marker is RED.
             */
            if (Geo4.this.markerPoints.size() == 1) {
                options.icon(BitmapDescriptorFactory
                        .defaultMarker

(BitmapDescriptorFactory.HUE_GREEN));
            } else if (Geo4.this.markerPoints.size() == 2) {
                options.icon(BitmapDescriptorFactory
                        .defaultMarker

(BitmapDescriptorFactory.HUE_RED));
            }

            // Add new marker to the Google Map Android API V2
            Geo4.this.mapG3.addMarker(options);

            // Checks, whether start and end locations are captured
            if (Geo4.this.markerPoints.size() >= 2) {
                LatLng origin = Geo4.this.markerPoints.get(0);
                LatLng dest = Geo4.this.markerPoints.get(1);

                // Getting URL to the Google Directions API
                String url = Geo4.this.getDirectionsUrl(origin, dest);

                DownloadTask downloadTask = new DownloadTask();

                // Start downloading json data from Google Directions API
                downloadTask.execute(url);
            }
        }
    });
}//-- END Method

private String getDirectionsUrl(LatLng updatedLatLng, LatLng dest) {
    // Origin of route
    String str_updatedLatLng = "origin=" + updatedLatLng.latitude + ","
            + updatedLatLng.longitude;

    // Destination of route
    String str_dest = "destination=" + dest.latitude + "," + dest.longitude;

    // Sensor enabled
    String sensor = "sensor=false";

    // Building the parameters to the web service
    String parameters = str_updatedLatLng + "&" + str_dest + "&" + sensor;

    // Output format
    String output = "json";

    // Building the url to the web service
    String url = "https://maps.googleapis.com/maps/api/directions/"
            + output + "?" + parameters;

    return url;
}

/** A method to download json data from url */
private String downloadUrl(String strUrl) throws IOException {
    String data = "";
    InputStream iStream = null;
    HttpURLConnection urlConnection = null;
    try {
        URL url = new URL(strUrl);

        // Creating an http connection to communicate with url
        urlConnection = (HttpURLConnection) url.openConnection();

        // Connecting to url
        urlConnection.connect();

        // Reading data from url
        iStream = urlConnection.getInputStream();

        BufferedReader br = new BufferedReader(new InputStreamReader(
                iStream));

        StringBuffer sb = new StringBuffer();

        String line = "";
        while ((line = br.readLine()) != null) {
            sb.append(line);
        }

        data = sb.toString();

        br.close();

    } catch (Exception e) {
        Log.d("Exception while downloading url", e.toString());
    } finally {
        iStream.close();
        urlConnection.disconnect();
    }
    return data;
}

// Fetches data from url passed
private class DownloadTask extends AsyncTask<String, Void, String> {
    // Downloading data in non-ui thread
    @Override
    protected String doInBackground(String... url) {

        // For storing data from web service
        String data = "";

        try {
            // Fetching the data from web service
            data = Geo4.this.downloadUrl(url[0]);
        } catch (Exception e) {
            Log.d("Background Task", e.toString());
        }
        return data;
    }

    // Executes in UI thread, after the execution of
    // doInBackground()
    @Override
    protected void onPostExecute(String result) {
        super.onPostExecute(result);

        ParserTask parserTask = new ParserTask();

        // Invokes the thread for parsing the JSON data
        parserTask.execute(result);

    }
}

/** A class to parse the Google Places in JSON format */
private class ParserTask extends
        AsyncTask<String, Integer, List<List<HashMap<String, String>>>> {

    // Parsing the data in non-ui thread
    @Override
    protected List<List<HashMap<String, String>>> doInBackground(
            String... jsonData) {
        JSONObject jObject;
        List<List<HashMap<String, String>>> routes = null;

        try {
            jObject = new JSONObject(jsonData[0]);
            Geo3JSON parser = new Geo3JSON();

            // Starts parsing data
            routes = parser.parse(jObject);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return routes;
    }

    // Executes in UI thread, after the parsing process
    @Override
    protected void onPostExecute(List<List<HashMap<String, String>>> result) {
        ArrayList<LatLng> points = null;
        PolylineOptions lineOptions = null;
        MarkerOptions markerOptions = new MarkerOptions();
        String distance = "";
        String duration = "";

        if (result.size() < 1) {
            Toast.makeText(Geo4.this.getBaseContext(), "No Points",
                    Toast.LENGTH_SHORT).show();
            return;
        }

        // Traversing through all the routes
        for (int i = 0; i < result.size(); i++) {
            points = new ArrayList<LatLng>();
            lineOptions = new PolylineOptions();

            // Fetching i-th route
            List<HashMap<String, String>> path = result.get(i);

            // Fetching all the points in i-th route
            for (int j = 0; j < path.size(); j++) {
                HashMap<String, String> point = path.get(j);

                if (j == 0) { // Get distance from the list
                    distance = point.get("distance");
                    continue;
                } else if (j == 1) { // Get duration from the list
                    duration = point.get("duration");
                    continue;
                }
                double lat = Double.parseDouble(point.get("lat"));
                double lng = Double.parseDouble(point.get("lng"));
                LatLng position = new LatLng(lat, lng);
                points.add(position);
            }

            // Adding all the points in the route to LineOptions
            lineOptions.addAll(points);
            lineOptions.width(4);
            lineOptions.color(Color.RED);
        }

        Geo4.this.mapInfo_TV.setText("Distance: " + distance + "les");

        // Drawing polyline in the Google Map for the route
        Geo4.this.mapG3.addPolyline(lineOptions);
    }
}

// --- END Methods

// --- onLocationListener

@Override
public void onLocationChanged(Location oLc) {

    updatedLatLng = new LatLng(oLc.getLatitude(), oLc.getLongitude());

    startMO = new MarkerOptions().position(updatedLatLng)
    .title("You Are Here")
    .icon(BitmapDescriptorFactory
            .defaultMarker(BitmapDescriptorFactory.HUE_ORANGE));
    mapG3.addMarker(startMO);

    addwcbcMarkerOption();

    locMan.removeUpdates(this);

}

@Override
public void onProviderDisabled(String provider) {
    //

}

@Override
public void onProviderEnabled(String provider) {
    //

}

@Override
public void onStatusChanged(String provider, int status, Bundle extras) {
    //

}

// --- END onLocationListener

@Override
protected void onPause() {
    super.onPause();
    overridePendingTransition(R.anim.fadein, R.anim.fadeout);
    finish();
}

// --- inflated menu
@Override
public boolean onCreateOptionsMenu(Menu menu) {
    // Inflate the menu; this adds items to the action bar if it is present.
    getMenuInflater().inflate(R.menu.wcbcv, menu);
    return true;
}

@Override
public boolean onOptionsItemSelected(MenuItem item) {
    switch (item.getItemId()) {
    case R.id.menu_legalnotices:
        String LicenseInfo = GooglePlayServicesUtil
                .getOpenSourceSoftwareLicenseInfo(getApplicationContext

());
        AlertDialog.Builder LicenseDialog = new AlertDialog.Builder(
                Geo4.this);
        LicenseDialog.setTitle("Legal Notices");
        LicenseDialog.setMessage(LicenseInfo);
        LicenseDialog.show();
        return true;
    }
    return super.onOptionsItemSelected(item);
}

// --- END inflated menu
}

这是我在另一篇帖子上的答案链接: http://stackoverflow.com/a/33955899/3849039 - AnupamChugh
3个回答

3

我弄清楚了。我的onTouchMap()大部分是获取onTouch信息并将这些整数转换为LatLng值。由于我已经有了LatLng值,因此我只需要该方法的最后三行,即获取LatLng并从中获取JSON数据。因此,我重写了该方法,首先添加了MarkerOptionsLatLng值,然后添加了旧方法的最后3行。所以这就是我的新方法的样子,它可以通过调用其他3个方法正确地绘制折线并在TextView中显示英里数。

    public void addMarkers(){
    wcbcMO = new MarkerOptions().position(wcbcLatLng)
    .title("Destination")
    .icon(BitmapDescriptorFactory
            .defaultMarker(BitmapDescriptorFactory.HUE_VIOLET));
    mapG3.addMarker(wcbcMO);

    startMO = new MarkerOptions().position(updatedLatLng)
    .title("You Are Here")
    .icon(BitmapDescriptorFactory
            .defaultMarker(BitmapDescriptorFactory.HUE_ORANGE));
    mapG3.addMarker(startMO);

    // Getting URL to the Google Directions API
    String url = Geo4.this.getDirectionsUrl(updatedLatLng, wcbcLatLng);

    DownloadTask downloadTask = new DownloadTask();

    // Start downloading json data from Google Directions API
    downloadTask.execute(url);
}//--- END Method

0
public class MainActivity extends Activity {
  static final LatLng HAMBURG = new LatLng(53.558, 9.927);
  static final LatLng KIEL = new LatLng(53.551, 9.993);
  private GoogleMap map;

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    map = ((MapFragment) getFragmentManager().findFragmentById(R.id.map))
            .getMap();
    Marker hamburg = map.addMarker(new MarkerOptions().position(HAMBURG)
            .title("Hamburg"));
    Marker kiel = map.addMarker(new MarkerOptions()
            .position(KIEL)            
            .title("Kiel")
            .snippet("Kiel is cool")
            .icon(BitmapDescriptorFactory
                    .fromResource(R.drawable.ic_launcher)));


    map.moveCamera(CameraUpdateFactory.newLatLngZoom(HAMBURG, 15));
    map.setMyLocationEnabled(true);


    map.animateCamera(CameraUpdateFactory.zoomTo(10), 2000, null);

    map.setOnMapClickListener(new OnMapClickListener() {

        private double latitude;
        private double longitude;

        @Override
        public void onMapClick(LatLng arg0) {

            latitude = arg0.latitude;
            longitude = arg0.longitude;

            StringBuilder result = new StringBuilder();
            try {
                Geocoder geocoder = new Geocoder(MainActivity.this, Locale
                        .getDefault());
                List<Address> addresses = geocoder.getFromLocation(
                        latitude, longitude, 1);
                if (addresses.size() > 0) {
                    Address address = addresses.get(0);
                    result.append(address.getLocality()).append("\n");
                    result.append(address.getCountryName());
                    Toast.makeText(getApplicationContext(), result, 3000)
                            .show();
                }
            } catch (IOException e) {
                Log.e("tag", e.getMessage());
            }

        }

    });

}

 public String makeURL (double sourcelat, double sourcelog, double destlat, double destlog ){
        StringBuilder urlString = new StringBuilder();
        urlString.append("http://maps.googleapis.com/maps/api/directions/json");
        urlString.append("?origin=");// from
        urlString.append(Double.toString(sourcelat));
        urlString.append(",");
        urlString
                .append(Double.toString( sourcelog));
        urlString.append("&destination=");// to
        urlString
                .append(Double.toString( destlat));
        urlString.append(",");
        urlString.append(Double.toString( destlog));
        urlString.append("&sensor=false&mode=driving&alternatives=true");
        return urlString.toString();
 }

 public class JSONParser {

        InputStream is = null;
        JSONObject jObj = null;
        String json = "";

        public JSONParser() {
        }
        public String getJSONFromUrl(String url) {


            try {

                DefaultHttpClient httpClient = new DefaultHttpClient();
                HttpPost httpPost = new HttpPost(url);

                HttpResponse httpResponse = httpClient.execute(httpPost);
                HttpEntity httpEntity = httpResponse.getEntity();
                is = httpEntity.getContent();           

            } catch (UnsupportedEncodingException e) {
                e.printStackTrace();
            } catch (ClientProtocolException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
            }
            try {
                BufferedReader reader = new BufferedReader(new InputStreamReader(
                        is, "iso-8859-1"), 8);
                StringBuilder sb = new StringBuilder();
                String line = null;
                while ((line = reader.readLine()) != null) {
                    sb.append(line + "\n");
                }

                json = sb.toString();
                is.close();
            } catch (Exception e) {
                Log.e("Buffer Error", "Error converting result " + e.toString());
            }
            return json;

        }

    }

 private String url;
  JSONParser jParser = new JSONParser();

     String json = jParser.getJSONFromUrl(url);



 public void drawPath(String  result) {

        try {

               final JSONObject json = new JSONObject(result);
               JSONArray routeArray = json.getJSONArray("routes");
               JSONObject routes = routeArray.getJSONObject(0);
               JSONObject overviewPolylines = routes.getJSONObject("overview_polyline");
               String encodedString = overviewPolylines.getString("points");
               List<LatLng> list = decodePoly(encodedString);

               for(int z = 0; z<list.size()-1;z++){
                    LatLng src= list.get(z);
                    LatLng dest= list.get(z+1);
                    Polyline line = map.addPolyline(new PolylineOptions()
                    .add(new LatLng(src.latitude, src.longitude), new LatLng(dest.latitude,   dest.longitude))
                    .width(2)
                    .color(Color.BLUE).geodesic(true));
                }

        } 
        catch (JSONException e) {

        }
    } 
 private List<LatLng> decodePoly(String encoded) {

        List<LatLng> poly = new ArrayList<LatLng>();
        int index = 0, len = encoded.length();
        int lat = 0, lng = 0;

        while (index < len) {
            int b, shift = 0, result = 0;
            do {
                b = encoded.charAt(index++) - 63;
                result |= (b & 0x1f) << shift;
                shift += 5;
            } while (b >= 0x20);
            int dlat = ((result & 1) != 0 ? ~(result >> 1) : (result >> 1));
            lat += dlat;

            shift = 0;
            result = 0;
            do {
                b = encoded.charAt(index++) - 63;
                result |= (b & 0x1f) << shift;
                shift += 5;
            } while (b >= 0x20);
            int dlng = ((result & 1) != 0 ? ~(result >> 1) : (result >> 1));
            lng += dlng;

            LatLng p = new LatLng( (((double) lat / 1E5)),
                     (((double) lng / 1E5) ));
            poly.add(p);
        }

        return poly;
    }



    @Override
public boolean onCreateOptionsMenu(Menu menu) {
    getMenuInflater().inflate(R.menu.main, menu);
    return true;
}  }

0

你可以分为两个步骤完成。

从 PHP 代码中执行方向请求,以获取编码的折线

使用第一步中的编码折线与静态地图相结合

例如:

https://maps.googleapis.com/maps/api/directions/json?origin=Grodno&destination=Minsk&mode=driving&key=YOUR_API_KEY

这将返回routes[0]->overview_polyline->points中的编码折线。

现在在静态地图中使用该折线:

https://maps.googleapis.com/maps/api/staticmap?size=600x400&path=enc%3AohqfIc_jpCkE%7DCx%40mJdDa%5BbD%7BM%7D%40e%40_MgKiQuVOoFlF%7DVnCnBn%40aDlDkN%7DDwEt%40%7DM%7DB_TjBy%7C%40lEgr%40lMa%60BhSi%7C%40%7COmuAxb%40k%7BGh%5E_%7BFjRor%40%7CaAq%7DC~iAomDle%40i%7BA~d%40ktBbp%40%7DqCvoA%7DjHpm%40uuDzH%7Dm%40sAg%7DB%60Bgy%40%7CHkv%40tTsxAtCgl%40aBoeAwKwaAqG%7B%5CeBc_%40p%40aZx%60%40gcGpNg%7CBGmWa%5CgpFyZolF%7BFgcDyPy%7CEoK_%7BAwm%40%7BqFqZaiBoNsqCuNq%7BHk%60%40crG%7B%5DqkBul%40guC%7BJ%7D%5DaNo%7B%40waA%7DmFsLc_%40_V%7Dh%40icAopBcd%40i_A_w%40mlBwbAiiBmv%40ajDozBibKsZ%7DvAkLm%5DysAk%7DCyr%40i%60BqUkp%40mj%40uoBex%40koAk_E_hG%7B%60Ac%7DAwp%40soAyk%40ogAml%40%7Bg%40qKsNeJw%5DeuA%7D%60Fkm%40czBmK%7Bg%40wCed%40b%40_e%40dT%7BgCzx%40csJrc%40ejFtGi%60CnB_pFhCa%60Gw%40%7Du%40wFwaAmP%7BoA%7Dj%40etBsRm_AiGos%40aCyy%40Lic%40tFohA~NeoCvC_%7CAWm~%40gb%40w~DuLex%40mUk_Ae_%40o_Aol%40qmAgv%40_%7DAaf%40qhAkMcl%40mHwn%40iCuq%40Nqi%40pF%7D%7CE~CyiDmFkgAoUedAcb%40ku%40ma%40cl%40mUko%40sLwr%40mg%40awIoA_aApDe~%40dKytAfw%40kyFtCib%40%7DA%7Bj%40kd%40usBcRgx%40uFwb%40%7BCulAjJmbC~CumAuGwlA_%5Du_C_PqyB%7BI%7DiAwKik%40%7DUcr%40ya%40up%40%7DkB%7DoCoQ%7Da%40aMyf%40an%40wjEimBuwKiYybC%7DLuyBoJ%7DhBuMieAwd%40i%7BB%7B~%40g%60D_Si%5Dsi%40%7Bk%40cPeSuH_T%7DNct%40kNcmC_Gyr%40mq%40_~AkmA%7DkCksByrE_N%7Bc%40oAcs%40%60J%7Bi%40t%7DByaHxNqt%40tGgxA%7CJ%7BkGeJ_aDsQi_HmFwuAmI%7BdA_XijByFgv%40%7DAiwBxDocAdM%7BlAtSmcAfUmaAptAmbGh~AcvGbwBc%7DHff%40shB~Isp%40nQu%7DB%60UsuCbBok%40l%40%7DzAhIwbA~OuaAnYwp%40rYwe%40%7CNke%40zc%40%7BhBrOwRdo%40sf%40xNaTb_%40uy%40ta%40k~%40xTap%40hl%40uiCre%40unHlIi~AlFsc%40rEkk%40aAce%40mL%7DlAwPcyB_GohBzDsqAtMqtA~h%40weDtFkd%40Bi%60%40_XwfEdAag%40dEkM%60%40zAqApJef%40%7BP_o%40sYys%40ai%40yf%40_j%40y_%40oi%40mVi%5EmFqSwAiPtDuQbc%40_nAtZyaAlEkc%40r%40eq%40%7CAo%5BrTwcAtVuz%40vQ%7Dd%40%7CPmb%40xT%7B%5CzZyd%40jG%7BRzL%7Dh%40jr%40ov%40rFiImFqPiD%7BJ&key=YOUR_API_KEY


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接