com.mapbox.mapboxsdk.overlay.GeoJSONPainter Maven / Gradle / Ivy
package com.mapbox.mapboxsdk.overlay;
import android.os.AsyncTask;
import android.text.TextUtils;
import android.util.Log;
import com.cocoahero.android.geojson.FeatureCollection;
import com.mapbox.mapboxsdk.util.DataLoadingUtils;
import com.mapbox.mapboxsdk.views.MapView;
import java.io.InputStream;
import java.util.ArrayList;
public class GeoJSONPainter {
private final MapView mapView;
private final Icon markerIcon;
public GeoJSONPainter(final MapView mapView, final Icon markerIcon) {
super();
this.mapView = mapView;
this.markerIcon = markerIcon;
}
public void loadFromURL(final String url) {
if (TextUtils.isEmpty(url)) {
return;
}
new LoadAndDisplay().execute(url);
}
/**
* Class that generates markers from formats such as GeoJSON
*/
private class LoadAndDisplay extends AsyncTask> {
@Override
protected ArrayList
© 2015 - 2025 Weber Informatics LLC | Privacy Policy