Skip to content

Commit

Permalink
feat: Road KMl and Airplane KML implemented
Browse files Browse the repository at this point in the history
  • Loading branch information
AritraBiswas9788 committed Jul 6, 2024
1 parent 0e5c4a3 commit 90fd4f3
Show file tree
Hide file tree
Showing 25 changed files with 1,036 additions and 171 deletions.
24 changes: 19 additions & 5 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ if (localPropertiesFile.exists()) {
}
}

def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}


def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
Expand All @@ -23,7 +30,7 @@ if (flutterVersionName == null) {
}

android {
namespace "com.example.super_liquid_galaxy_controller"
namespace "com.aritra.super_liquid_galaxy_controller"
compileSdkVersion 34
ndkVersion flutter.ndkVersion

Expand All @@ -42,7 +49,7 @@ android {

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.super_liquid_galaxy_controller"
applicationId "com.aritra.super_liquid_galaxy_controller"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion flutter.minSdkVersion
Expand All @@ -51,13 +58,20 @@ android {
versionName flutterVersionName
}

signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
signingConfig signingConfigs.release
}
}

}

flutter {
Expand Down
3 changes: 2 additions & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.BLUETOOTH"/>
Expand All @@ -30,7 +31,7 @@
/>

<application
android:label="super_liquid_galaxy_controller"
android:label="Super Liquid Galaxy Controller"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
<meta-data android:name="com.google.android.geo.API_KEY"
Expand Down

This file was deleted.

Binary file modified android/app/src/main/res/mipmap-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions lib/components/location_selector.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class LocationSelector extends StatefulWidget {
double? width;
double? iconSize;
double? searchSize;
Function(Coordinates) submitData;
Function(Coordinates,String) submitData;

@override
State<LocationSelector> createState() => _LocationSelectorState();
Expand Down Expand Up @@ -356,7 +356,7 @@ class _LocationSelectorState extends State<LocationSelector> {
));
}
}
widget.submitData(point);
widget.submitData(point,label);
}


Expand All @@ -368,7 +368,7 @@ class _LocationSelectorState extends State<LocationSelector> {
print(out);
if (out.isNotEmpty) {
widget.submitData(
Coordinates(latitude: out[0].latitude, longitude: out[0].longitude));
Coordinates(latitude: out[0].latitude, longitude: out[0].longitude), label);
}
else {
if (!Get.isSnackbarOpen) {
Expand Down
10 changes: 2 additions & 8 deletions lib/components/navisland.dart
Original file line number Diff line number Diff line change
Expand Up @@ -153,15 +153,9 @@ class NavIsland extends StatelessWidget {
color: Colors.transparent,
child: InkWell(
onTap: () async {
/*LatLng centerPoint = LatLng(37.7749, -122.4194); // Example center point (San Francisco)
double length = 120.0; // Length of the footprint in meters
double width = 70.0; // Width of the footprint in meters
double angle = 0 * (Math.pi / 180); // Angle of rotation in radians (45 degrees in this case)

String kmlOutput = KMLGenerator.generateFootprintBottomPolygon(centerPoint, length, width, angle);
print(kmlOutput);*/
LatLng start = LatLng(1,6);
LatLng end = LatLng(5, 3);
LatLng start = LatLng(1,5);
LatLng end = LatLng(7,11);

double dashLength = 10000.0; // Length of each dash in meters
double gapLength = 5000.0; // Length of gap between dashes in meters
Expand Down
10 changes: 8 additions & 2 deletions lib/data_class/coordinate.dart
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
import 'package:latlong2/latlong.dart';

class Coordinates {
double latitude;
double longitude;
late double latitude;
late double longitude;

Coordinates({
required this.latitude,
required this.longitude,
});
Coordinates.fromLatLng(LatLng point) {
latitude = point.latitude;
longitude = point.longitude;
}

// Override toString for better debugging output
@override
Expand Down
Loading

0 comments on commit 90fd4f3

Please sign in to comment.