Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
22_23-J 50
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
22_23-J 50
22_23-J 50
Commits
8d32716e
Commit
8d32716e
authored
Jan 30, 2023
by
Yasiru-Deshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add marker
parent
56a374f9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
119 additions
and
6 deletions
+119
-6
Frontend/look_ai/android/app/src/main/AndroidManifest.xml
Frontend/look_ai/android/app/src/main/AndroidManifest.xml
+5
-3
Frontend/look_ai/ios/Runner/AppDelegate.swift
Frontend/look_ai/ios/Runner/AppDelegate.swift
+1
-1
Frontend/look_ai/lib/main.dart
Frontend/look_ai/lib/main.dart
+113
-2
No files found.
Frontend/look_ai/android/app/src/main/AndroidManifest.xml
View file @
8d32716e
...
...
@@ -28,14 +28,16 @@
android:resource=
"@drawable/launch_background"
/>
<meta-data
android:name=
"com.google.android.geo.API_KEY"
android:value=
"AIzaSyDVIdYvuHrcQKg5Nm4NqEkhEJgvT93epXQ"
/>
<intent-filter>
<intent-filter>
<action
android:name=
"android.intent.action.MAIN"
/>
<category
android:name=
"android.intent.category.LAUNCHER"
/>
</intent-filter>
</activity>
<meta-data
android:name=
"com.google.android.geo.API_KEY"
android:value=
"AIzaSyABS88malpXXr__XRF8OhZWE3m6O9hdjsU"
/>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
...
...
Frontend/look_ai/ios/Runner/AppDelegate.swift
View file @
8d32716e
...
...
@@ -8,7 +8,7 @@ import GoogleMaps
_
application
:
UIApplication
,
didFinishLaunchingWithOptions
launchOptions
:
[
UIApplication
.
LaunchOptionsKey
:
Any
]?
)
->
Bool
{
GMSServices
.
provideAPIKey
(
"AIzaSy
DVIdYvuHrcQKg5Nm4NqEkhEJgvT93epXQ
"
)
GMSServices
.
provideAPIKey
(
"AIzaSy
ABS88malpXXr__XRF8OhZWE3m6O9hdjsU
"
)
GeneratedPluginRegistrant
.
register
(
with
:
self
)
return
super
.
application
(
application
,
didFinishLaunchingWithOptions
:
launchOptions
)
}
...
...
Frontend/look_ai/lib/main.dart
View file @
8d32716e
...
...
@@ -31,6 +31,13 @@ class MapSampleState extends State<MapSample> {
zoom:
14.4746
,
);
static
const
Marker
_kGooglePlexMarker
=
Marker
(
markerId:
MarkerId
(
'_kGooglePlex'
),
infoWindow:
InfoWindow
(
title:
"Google Plex"
),
icon:
BitmapDescriptor
.
defaultMarker
,
position:
LatLng
(
37.42796133580664
,
-
122.085749655962
),
);
static
const
CameraPosition
_kLake
=
CameraPosition
(
bearing:
192.8334901395799
,
target:
LatLng
(
37.43296265331129
,
-
122.08832357078792
),
...
...
@@ -41,7 +48,8 @@ class MapSampleState extends State<MapSample> {
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
body:
GoogleMap
(
mapType:
MapType
.
hybrid
,
mapType:
MapType
.
normal
,
markers:
{
_kGooglePlexMarker
},
initialCameraPosition:
_kGooglePlex
,
onMapCreated:
(
GoogleMapController
controller
)
{
_controller
.
complete
(
controller
);
...
...
@@ -59,4 +67,107 @@ class MapSampleState extends State<MapSample> {
final
GoogleMapController
controller
=
await
_controller
.
future
;
controller
.
animateCamera
(
CameraUpdate
.
newCameraPosition
(
_kLake
));
}
}
\ No newline at end of file
}
/*import 'package:flutter/material.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
void main() => runApp(const MyApp());
class MyApp extends StatefulWidget {
const MyApp({AIzaSyDVIdYvuHrcQKg5Nm4NqEkhEJgvT93epXQ});
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
late GoogleMapController mapController;
final LatLng _center = const LatLng(45.521563, -122.677433);
void _onMapCreated(GoogleMapController controller) {
mapController = controller;
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Maps Sample App'),
backgroundColor: Colors.green[700],
),
body: GoogleMap(
onMapCreated: _onMapCreated,
initialCameraPosition: CameraPosition(
target: _center,
zoom: 11.0,
),
),
),
);
}
}*/
/*import 'package:flutter/material.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
void main() => runApp(MyApp());
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
GoogleMapController myMapController;
final Set<Marker> _markers = new Set();
static const LatLng _mainLocation = const LatLng(25.69893, 32.6421);
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: Text('Maps With Marker'),
backgroundColor: Colors.blue[900],
),
body: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Expanded(
child: GoogleMap(
initialCameraPosition: CameraPosition(
target: _mainLocation,
zoom: 10.0,
),
markers: this.myMarker(),
mapType: MapType.normal,
onMapCreated: (controller) {
setState(() {
myMapController = controller;
});
},
),
),
],
)));
}
Set<Marker> myMarker() {
setState(() {
_markers.add(Marker(
// This marker id can be anything that uniquely identifies each marker.
markerId: MarkerId(_mainLocation.toString()),
position: _mainLocation,
infoWindow: InfoWindow(
title: 'Historical City',
snippet: '5 Star Rating',
),
icon: BitmapDescriptor.defaultMarker,
));
});
return _markers;
}
}*/
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment