0
votes

How can I disable blurr effect in xamarin, which you can see on image?

enter image description here

As you can see on image, I have an issue where the highways are blurred instead of getting sharper. I need to know how I can set it sharper. I can zoom in and out, but it just only zoom in instead showing more details. Please help.

My AndroidManifest.xml:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.companyname.freemomentapp">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="30" />
<!-- Google Maps for Android v2 requires OpenGL ES v2 -->
<uses-feature android:glEsVersion="0x00020000" android:required="true" />

<!-- Permission to receive remote notifications from Google Play Services -->
<!-- Notice here that we have the package name of our application as a prefix on the permissions. -->
<uses-permission android:name="com.companyname.freemomentapp.permission.MAPS_RECEIVE" />
<permission android:name="com.companyname.freemomentapp.permission.MAPS_RECEIVE" android:protectionLevel="signature" />

<!-- These are optional, but recommended. They will allow Maps to use the My Location provider. -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
  
<application android:label="FreemomentApp.Android" android:theme="@style/MainTheme">
  <meta-data android:name="com.google.android.geo.API_KEY" android:value="<Key is removed for this question>" />
  <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
  <!-- Necessary for apps that target Android 9.0 or higher -->
  <uses-library android:name="org.apache.http.legacy" android:required="false" />
</application>

My MapsPage.xaml:

<?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" 
         xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
         xmlns:maps="clr-namespace:Xamarin.Forms.Maps;assembly=Xamarin.Forms.Maps"
         x:Class="FreemomentApp.Views.MapsPage">
<maps:Map x:Name="map" MapClicked="OnMapClicked" />

My MapsPage.xml.cs:

public partial class MapsPage : ContentPage
{
    public MapsPage()
    {
        Map map = new Map();
        map.MapClicked += OnMapClicked;
        map.MoveToRegion(MapSpan.FromCenterAndRadius(new Position(53.2374847, 8.6868356), Distance.FromKilometers(1)));
        Content = map;
    }

    private void OnMapClicked(object sender, MapClickedEventArgs e)
    {
        Console.WriteLine("hallo");
        //throw new NotImplementedException();
    }
}
1
usually its blurry when it hasn't finished downloading tile data - Jason
@Jaroxa I test your code, and I don't have this problem, and I can see detailed info when zooming in and out. - Cherry Bu - MSFT
Can you tell me, which version do you use for maps? - Jaroxa
@Jaroxa Xamarin.Forms.Maps version is 4.2.0.608146 - Cherry Bu - MSFT

1 Answers

0
votes

Solution: Change the api key in androidManifest.xml

It seems like there was an issue with the api key. I switch the new key with an old one and it works well now. I can not tell you, why it is blurred instead of showing gray screen like usual.