microsoft / MapsSDK-Native

This repository contains samples, documentation and releases history for the Bing Maps SDK for Android and iOS.
MIT License
40 stars 23 forks source link

Map displays as a blue frame (Android Studio) #45

Closed bluesun3k1 closed 3 years ago

bluesun3k1 commented 3 years ago

Hello,

I followed the step-by-step instructions provided here https://docs.microsoft.com/en-us/bingmaps/sdk-native/getting-started-android/ and my up doesn't crash when I load the emulator but the map itself doesn't work, it just displays as a blue frame. I can see the controls and the MS Corporation watermark but there is no map. I tried to render it as VECTOR and as RASTER but neither works, I get the same result.

mMapView = new MapView(this, MapRenderMode.RASTER); // or use MapRenderMode.RASTER for 2D map mMapView.setCredentialsKey(BuildConfig.CREDENTIALS_KEY); ((FrameLayout)findViewById(R.id.bing_map_view)).addView(mMapView); mMapView.onCreate(savedInstanceState);

And this is the end result.

image

The only error I get in the log when I click on the blue area or the controls is this E/eglCodecCommon: glUtilsParamSize: unknow param 0x000085b5

Any ideas on how to make this work?

bluesun3k1 commented 3 years ago

I found the problem. Turns out that the emulator was using WiFi to connect to the internet and for some reason the WiFi was "Connected, No Internet". I switched to the LTE network in the emulator since it's supported and it picked up the internet right away and the map loaded as intended.

There is a configuration for making the emulator in android studio connect to the internet, so there is that too just in case anyone runs into the same problem. using the "Mobile Network" worked for me.