You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
i have tried to create a sample with this code:
import com.airbnb.android.airmapview.AirMapMarker;
import com.airbnb.android.airmapview.AirMapPolyline;
import com.airbnb.android.airmapview.AirMapView;
import com.airbnb.android.airmapview.DefaultAirMapViewBuilder;
import com.airbnb.android.airmapview.listeners.OnMapInitializedListener;
import com.google.android.gms.maps.model.LatLng;
import java.util.Arrays;
public class SelectMapAreaGame extends AppCompatActivity implements OnMapInitializedListener {
private AirMapView map;
private DefaultAirMapViewBuilder mapViewBuilder;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_select_map_area_game);
mapViewBuilder = new DefaultAirMapViewBuilder(this);
map = (AirMapView) findViewById(R.id.map_view);
map.setOnMapInitializedListener(this);
map.initialize(getSupportFragmentManager());
}
private void addMarker(String title, LatLng latLng, int id) {
map.addMarker(new AirMapMarker.Builder()
.id(id)
.position(latLng)
.title(title)
.iconId(R.drawable.ghost)
.build());
}
@Override public void onMapInitialized() {
System.out.println("Map onMapInitialized triggered");
final LatLng airbnbLatLng = new LatLng(37.771883, -122.405224);
addMarker("Airbnb HQ", airbnbLatLng, 1);
addMarker("Performance Bikes", new LatLng(37.773975, -122.40205), 2);
addMarker("REI", new LatLng(37.772127, -122.404411), 3);
addMarker("Mapbox", new LatLng(37.77572, -122.41354), 4);
map.animateCenterZoom(airbnbLatLng, 10);
// Add Polylines
LatLng[] latLngs = {
new LatLng(37.77977, -122.38937),
new LatLng(37.77811, -122.39160),
new LatLng(37.77787, -122.38864)};
map.addPolyline(new AirMapPolyline(Arrays.asList(latLngs), 5));
// Add Circle
map.drawCircle(new LatLng(37.78443, -122.40805), 1000);
// enable my location
map.setMyLocationEnabled(true);
}
}
and i have a blank view with this in the console:
W/webcore: java.lang.Throwable: EventHub.removeMessages(int what = 107) is not supported before the WebViewCore is set up.
at android.webkit.WebViewCore$EventHub.removeMessages(WebViewCore.java:1684)
at android.webkit.WebViewCore$EventHub.access$7900(WebViewCore.java:927)
at android.webkit.WebViewCore.removeMessages(WebViewCore.java:1796)
at android.webkit.WebView.sendOurVisibleRect(WebView.java:2953)
at android.webkit.ZoomManager.setZoomScale(ZoomManager.java:593)
at android.webkit.ZoomManager.access$1700(ZoomManager.java:49)
at android.webkit.ZoomManager$PostScale.run(ZoomManager.java:984)
at android.os.Handler.handleCallback(Handler.java:605)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4424)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
how i can fix?
The text was updated successfully, but these errors were encountered:
I don't have a device with API 15 available for testing, but I tried on one with API 16 and it worked fine. Can you try on a different device to see if the problem persists?
I don't have a device with API 15 available for testing, but I tried on one with API 16 and it worked fine. Can you try on a different device to see if the problem persists?
—
Reply to this email directly or view it on GitHub #83 (comment).
Hi,
i have tried to create a sample with this code:
and i have a blank view with this in the console:
how i can fix?
The text was updated successfully, but these errors were encountered: