Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
getme
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
amal
getme
Commits
48c4b6dd
Commit
48c4b6dd
authored
Mar 05, 2020
by
Adarsh K
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
latitude mistakes
parent
f40def8a
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
18 additions
and
12 deletions
+18
-12
app.component.ts
src/app/app.component.ts
+1
-0
home.page.ts
src/app/home/home.page.ts
+2
-2
productlist.page.scss
src/app/productlist/productlist.page.scss
+1
-1
trackorder.page.ts
src/app/trackorder/trackorder.page.ts
+2
-2
address.service.ts
src/config/address.service.ts
+9
-4
order.service.ts
src/config/order.service.ts
+1
-1
products.service.ts
src/config/products.service.ts
+2
-2
No files found.
src/app/app.component.ts
View file @
48c4b6dd
...
...
@@ -144,6 +144,7 @@ export class AppComponent {
'review'
];
const
currentUrl
=
this
.
router
.
url
.
split
(
'/'
);
console
.
log
(
currentUrl
);
const
index
=
restrictedUrl
.
findIndex
(
x
=>
x
===
currentUrl
[
1
]);
// console.log(currentUrl[1], index, this.state);
if
(
index
>
-
1
||
this
.
tabData
===
false
)
{
...
...
src/app/home/home.page.ts
View file @
48c4b6dd
...
...
@@ -125,8 +125,8 @@ export class HomePage implements OnInit {
this
.
address
=
address
.
address
;
console
.
log
(
address
.
latLng
);
this
.
centerService
.
getNearBy
(
address
.
latLng
.
_lat
,
address
.
latLng
.
_long
,
address
.
latLng
.
latitude
,
address
.
latLng
.
longitude
,
this
.
service
.
distance
);
this
.
loader
=
false
;
...
...
src/app/productlist/productlist.page.scss
View file @
48c4b6dd
...
...
@@ -141,7 +141,7 @@
}
.ellipse
{
white-space
:
nowrap
;
width
:
1
8
0px
;
width
:
1
5
0px
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
...
...
src/app/trackorder/trackorder.page.ts
View file @
48c4b6dd
...
...
@@ -51,8 +51,8 @@ export class TrackorderPage implements OnInit {
getDirection
()
{
this
.
order
=
this
.
myorder
.
selItem
;
this
.
origin
=
{
lat
:
this
.
order
.
pickupLocation
.
_lat
,
lng
:
this
.
order
.
pickupLocation
.
_long
};
this
.
destination
=
{
lat
:
this
.
order
.
deliveryLocation
.
_lat
,
lng
:
this
.
order
.
deliveryLocation
.
_long
};
this
.
origin
=
{
lat
:
this
.
order
.
pickupLocation
.
latitude
,
lng
:
this
.
order
.
pickupLocation
.
longitude
};
this
.
destination
=
{
lat
:
this
.
order
.
deliveryLocation
.
latitude
,
lng
:
this
.
order
.
deliveryLocation
.
longitude
};
this
.
renderOptions
=
{
polylineOptions
:
{
strokeColor
:
'rgba(69, 67, 152,1)'
},
suppressMarkers
:
true
};
this
.
markerOptions
=
{
origin
:
{
...
...
src/config/address.service.ts
View file @
48c4b6dd
...
...
@@ -137,7 +137,7 @@ export class AddressService {
public
async
getNearBy
(
centerId
,
userId
,
distance
)
{
// latitude, longitude, distance, userId
console
.
log
(
centerId
);
console
.
log
(
centerId
,
userId
,
distance
);
if
(
centerId
)
{
this
.
afs
.
collection
(
'centers'
).
doc
(
centerId
).
ref
.
get
().
then
((
doc
)
=>
{
if
(
doc
.
exists
)
{
...
...
@@ -145,8 +145,7 @@ export class AddressService {
const
center
=
doc
.
data
();
const
This
=
this
;
const
state
=
true
;
const
latitude
=
center
.
latLng
.
_lat
;
const
longitude
=
center
.
latLng
.
_long
;
this
.
centerLoc
=
{
cId
:
center
.
cId
,
centerImg
:
center
.
centerImg
,
...
...
@@ -157,17 +156,23 @@ export class AddressService {
location
:
center
.
location
,
status
:
center
.
status
};
console
.
log
(
this
.
centerLoc
);
const
latitude
=
center
.
latLng
.
latitude
;
const
longitude
=
center
.
latLng
.
longitude
;
const
lat
=
0.0144927536231884
;
const
lon
=
0.0181818181818182
;
console
.
log
(
latitude
+
' - '
+
lat
+
' * '
+
distance
);
const
lowerLat
=
latitude
-
lat
*
distance
;
const
lowerLon
=
longitude
-
lon
*
distance
;
const
greaterLat
=
latitude
+
lat
*
distance
;
const
greaterLon
=
longitude
+
lon
*
distance
;
console
.
log
(
lowerLat
,
lowerLon
,
greaterLat
,
greaterLon
);
const
lesserGeopoint
=
new
firebase
.
firestore
.
GeoPoint
(
lowerLat
,
lowerLon
);
const
greaterGeopoint
=
new
firebase
.
firestore
.
GeoPoint
(
greaterLat
,
...
...
src/config/order.service.ts
View file @
48c4b6dd
...
...
@@ -140,7 +140,7 @@ export class OrdersService {
const
promise
=
new
Promise
(
resolve
=>
{
distinctShops
.
forEach
(
item
=>
{
console
.
log
(
item
);
const
pickup
=
new
firebase
.
firestore
.
GeoPoint
(
centerLoc
.
latLng
.
_lat
,
centerLoc
.
latLng
.
_long
);
const
pickup
=
new
firebase
.
firestore
.
GeoPoint
(
centerLoc
.
latLng
.
longitude
,
centerLoc
.
latLng
.
longitude
);
const
products
=
{};
const
cartItem
=
cartGroup
[
item
];
let
prodPrice
=
0
;
...
...
src/config/products.service.ts
View file @
48c4b6dd
...
...
@@ -23,9 +23,9 @@ export class ProductsService {
this
.
fav
=
[];
this
.
prodSlideImg
=
[];
this
.
service
.
get
(
'userData'
).
then
(
data
=>
{
console
.
log
(
data
);
this
.
user
=
JSON
.
parse
(
data
);
this
.
getFavlist
(
this
.
user
.
id
);
console
.
log
(
this
.
user
);
// this.getFavlist(this.user.uid);
});
}
...
...
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