Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate Google Maps Integration #2363

Merged
merged 1 commit into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions INSTALLATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,6 @@ You'll need to set up the IDE and mobile device emulator on your local system an
1. **API Environment**: This part is very important.
1. Make sure Talawa-API is up and running.
1. You will need to enter the URL of the API server in the Talawa app when it first starts up. The URL could be active on a system you control or in our test environment. The Talawa-API INSTALLATION.md will provide that information.
1. **Google APIs** (Optional): The app uses Google Maps API for venue selection. You will need to sign up for it if you want to test these features.
1. **Maps API Setup**: Follow these steps:
1. Go to [Google Developers Console](https://console.cloud.google.com).
1. Create a new project that you want to enable Google Maps on.
1. Search `credentials` in the search bar and select `Credentials` in APIs & Services. Click on `Create credentials` and select `API key`. Copy the key and replace it as said before.
1. Search `maps sdk for android` and select the `Google Maps SDK for Android` in Marketplace. You can also search `maps sdk for ios` and select the `Google Maps SDK for iOS` in Marketplace for iOS devices.
1. Click `Enable`.
1. **Mobile App Setup**: Enter your API key in the:
1. `android/app/src/main/AndroidManifest.xml` file for Android.
1. `ios/Runner/AppDelegate.swift` file for iOS.
1. Replace YOUR_KEY_HERE with your API key.
1. **Remember** to remove the key before committing changes and replace again with YOUR_KEY_HERE.

# Installation

Expand Down
4 changes: 0 additions & 4 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
</intent>
</queries>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<application
android:label="talawa"
android:icon="@mipmap/ic_launcher"
Expand Down Expand Up @@ -74,8 +72,6 @@
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/filepaths" />
</provider>
<meta-data android:name="com.google.android.geo.API_KEY"
android:value="YOUR_KEY_HERE"/>
<activity android:name="com.braintreepayments.api.BraintreeBrowserSwitchActivity"
android:launchMode="singleTask">
<intent-filter>
Expand Down
2 changes: 0 additions & 2 deletions ios/Runner/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import UIKit
import Flutter
import GoogleMaps

@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GMSServices.provideAPIKey("YOUR_KEY_HERE")
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
Expand Down
1 change: 0 additions & 1 deletion lang/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@
"Add tag": "Tag hinzufügen",
"Enter the Tag": "Geben Sie das Tag ein",
"Title": "Titel",
"Choose on map": "Auf der Karte wählen",
"Where is the event?": "Wo ist das Ereignis?",
"Add Members": "Mitglieder hinzufügen",
"All Events": "Alle Veranstaltungen",
Expand Down
1 change: 0 additions & 1 deletion lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@
"Add tag": "Add tag",
"Enter the Tag": "Enter the Tag",
"Title": "Title",
"Choose on map": "Choose on map",
"Where is the event?": "Where is the event?",
"Add Members": "Add Members",
"All Events": "All Events",
Expand Down
1 change: 0 additions & 1 deletion lang/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@
"Add tag": "Añadir etiqueta",
"Enter the Tag": "Ingrese la Etiqueta",
"Title": "Título",
"Choose on map": "Elegir en el mapa",
"Where is the event?": "¿Dónde está el evento?",
"Add Members": "Añadir miembros",
"All Events": "Todos los eventos",
Expand Down
1 change: 0 additions & 1 deletion lang/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@
"Add tag": "Ajouter un tag",
"Enter the Tag": "Entrez le Tag",
"Title": "Titre",
"Choose on map": "Choisir sur la carte",
"Where is the event?": "Où se trouve l'événement?",
"Add Members": "Ajouter des membres",
"All Events": "Tous les événements",
Expand Down
1 change: 0 additions & 1 deletion lang/hi.json
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@
"Add tag": "टैग जोड़ें",
"Enter the Tag": "टैग दर्ज करें",
"Title": "शीर्षक",
"Choose on map": "नक्शे पर चुनें",
"Where is the event?": "इवेंट कहाँ है?",
"Add Members": "सदस्य जोड़ें",
"All Events": "सभी ईवेंट्स",
Expand Down
1 change: 0 additions & 1 deletion lang/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@
"Add tag": "タグを追加する",
"Enter the Tag": "タグを入力してください",
"Title": "タイトル",
"Choose on map": "地図上で選択する",
"Where is the event?": "イベントはどこですか?",
"Add Members": "メンバーを追加する",
"All Events": "すべてのイベント",
Expand Down
1 change: 0 additions & 1 deletion lang/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@
"Add tag": "Adicionar tag",
"Enter the Tag": "Digite a Tag",
"Title": "Título",
"Choose on map": "Escolher no mapa",
"Where is the event?": "Onde é o evento?",
"Add Members": "Adicionar membros",
"All Events": "Todos os eventos",
Expand Down
1 change: 0 additions & 1 deletion lang/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@
"Add tag": "添加标签",
"Enter the Tag": "输入标签",
"Title": "标题",
"Choose on map": "在地图上选择",
"Where is the event?": "事件在哪里?",
"Add Members": "添加成员",
"All Events": "所有活动",
Expand Down
3 changes: 0 additions & 3 deletions lib/constants/routing_constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,6 @@ class Routes {
/// static variables.
static const String chatMessageScreen = '/chatMessageScreen';

/// static variables.
static const String mapScreen = '/mapScreen';

/// static variables.
static const String calendar = '/calendar';

Expand Down
16 changes: 0 additions & 16 deletions lib/router.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import 'package:talawa/models/post/post_model.dart';
import 'package:talawa/models/task/task_model.dart';
import 'package:talawa/splash_screen.dart';
import 'package:talawa/view_model/after_auth_view_models/chat_view_models/direct_chat_view_model.dart';
import 'package:talawa/view_model/after_auth_view_models/event_view_models/create_event_view_model.dart';
import 'package:talawa/views/after_auth_screens/add_post_page.dart';
import 'package:talawa/views/after_auth_screens/app_settings/app_settings_page.dart';
import 'package:talawa/views/after_auth_screens/chat/chat_message_screen.dart';
Expand All @@ -31,7 +30,6 @@ import 'package:talawa/views/after_auth_screens/tasks/create_task_page.dart';
import 'package:talawa/views/after_auth_screens/tasks/edit_task_page.dart';
import 'package:talawa/views/after_auth_screens/tasks/event_tasks_page.dart';
import 'package:talawa/views/after_auth_screens/tasks/user_tasks_page.dart';
import 'package:talawa/views/after_auth_screens/venue/map_screen.dart';
import 'package:talawa/views/demo_screens/explore_events_demo.dart';
import 'package:talawa/views/demo_screens/organization_feed_demo.dart';
import 'package:talawa/views/demo_screens/profile_page_demo.dart';
Expand Down Expand Up @@ -275,20 +273,6 @@ Route<dynamic> generateRoute(RouteSettings settings) {
),
);

// Returns the MapScreen Widget
case Routes.mapScreen:
final arguments = settings.arguments! as Map<String, dynamic>;
final model = arguments['model'] as CreateEventViewModel?;
final latitude = arguments['latitude'] as double;
final longitude = arguments['longitude'] as double;
return MaterialPageRoute(
builder: (context) => MapScreen(
model,
latitude,
longitude,
key: const Key('MapScreen'),
),
);
case Routes.calendar:
return MaterialPageRoute(
builder: (context) => EventCalendar(
Expand Down
22 changes: 0 additions & 22 deletions lib/views/after_auth_screens/events/create_event_form.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// ignore_for_file: talawa_good_doc_comments, talawa_api_doc
import 'package:flutter/material.dart';
import 'package:talawa/constants/routing_constants.dart';
import 'package:talawa/locator.dart';
import 'package:talawa/services/size_config.dart';
import 'package:talawa/utils/app_localization.dart';
import 'package:talawa/utils/validators.dart';
Expand Down Expand Up @@ -72,26 +70,6 @@ class CreateEventForm extends StatelessWidget {
border: InputBorder.none,
focusedBorder: InputBorder.none,
enabledBorder: InputBorder.none,
suffix: GestureDetector(
key: const Key('gesture_cef_test'),
onTap: () => navigationService.pushScreen(
Routes.mapScreen,
arguments: {
'model': model,
// initalize the map screen with a marker at this location
'latitude': 37.42796133580664,
'longitude': -122.085749655962,
},
),
child: Text(
AppLocalizations.of(context)!
.strictTranslate('Choose on map'),
style: Theme.of(context)
.textTheme
.bodySmall!
.copyWith(fontSize: 16),
),
),
prefixIcon: Container(
transform: Matrix4.translationValues(
-SizeConfig.screenWidth! * 0.027,
Expand Down
22 changes: 0 additions & 22 deletions lib/views/after_auth_screens/events/event_info_body.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:talawa/constants/routing_constants.dart';
import 'package:talawa/enums/enums.dart';
import 'package:talawa/locator.dart';
import 'package:talawa/services/size_config.dart';
Expand Down Expand Up @@ -164,27 +163,6 @@ class EventInfoBody extends StatelessWidget {
maxLines: 3,
),
const Spacer(),
// If the event location is not null then display the location
//on the map with the reference of latitude and longitude provided for the event.
if (event.latitude != null && event.longitude != null)
GestureDetector(
onTap: () => navigationService.pushScreen(
Routes.mapScreen,
arguments: {
"latitude": event.latitude,
"longitude": event.longitude,
},
),
child: Text(
'View on map',
style: Theme.of(context).textTheme.bodySmall!.copyWith(
color: Theme.of(context).colorScheme.secondary,
),
overflow: TextOverflow.ellipsis,
textAlign: TextAlign.left,
maxLines: 3,
),
),
],
),
const Divider(),
Expand Down
Loading
Loading