Didn't find class "android.gms.maps.model.LatLng" on path: DexPathList

GenCodeGenCode USMember ✭✭

Trying to add a polyline to google map v2

Code: PolylineOptions polylineOptions = new PolylineOptions();
polylineOptions.Add(new LatLng(27.9472, -82.4586), new LatLng(40.7, -74.0));

Manifest:
<?xml version="1.0" encoding="utf-8"?>

<activity android:screenOrientation="portrait" android:icon="@drawable/icon">
</activity>
<uses-permission android:name="android.permission.INTERNET" />
<!-- Google Maps for Android v2 requires OpenGL ES v2 -->
<uses-feature android:glEsVersion="0x00020000" android:required="true" />
<!-- We need to be able to download map tiles and access Google Play Services-->
<uses-permission android:name="android.permission.INTERNET" />
<!-- Allow the application to access Google web-based services. -->
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<!-- Google Maps for Android v2 will cache map tiles on external storage -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<!-- Google Maps for Android v2 needs this permission so that it may check the connection state as it must download data -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<!-- 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="<PACKAGE NAME>.permission.MAPS_RECEIVE" />
<permission android:name="<PACKAGE NAME>.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" />
    <!-- Notice here that we have the package name of our application as a prefix on the permissions. -->
<uses-permission android:name="com.hurricane.software.permission.MAPS_RECEIVE" />
<permission android:name="com.hurricane.software.permission.MAPS_RECEIVE" android:protectionLevel="signature" />
<application android:label="@string/app_name">
    <!-- Put your Google Maps V2 API Key here. This key will not work for you.-->
    <!-- See https://developers.google.com/maps/documentation/android/start#obtaining_an_api_key -->
    <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="MyCodeHere" />
    <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
</application>

Posts

  • GenCodeGenCode USMember ✭✭

    Fixed, changed to

    var polylineOptions = new PolylineOptions();
    polylineOptions.Add(new LatLng(27.9472, -82.4586));
    polylineOptions.Add(new LatLng(40.7, -74.0));

    etc

Sign In or Register to comment.