Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
hdastageeri
hft_awado_app
Commits
ace1e8b7
Commit
ace1e8b7
authored
Jan 11, 2020
by
Ratnadeep Rajendra Kharade
Browse files
Displayed address in search bar for selected location.
parent
9bfdc01c
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/app/hirebike/hirebike.page.ts
View file @
ace1e8b7
...
...
@@ -192,7 +192,7 @@ export class HirebikePage implements OnInit {
console
.
log
(
'
Bike Details
'
,
resp
);
this
.
bikeDetails
=
resp
.
data
;
this
.
noReservation
=
false
;
this
.
reverseGeocode
(
this
.
platform
,
this
.
bikeDetails
.
lat
,
this
.
bikeDetails
.
lon
);
//
this.reverseGeocode(this.platform, this.bikeDetails.lat, this.bikeDetails.lon);
this
.
isBikeReserved
=
true
;
//pass reserved bike subject here map
...
...
@@ -784,13 +784,14 @@ export class HirebikePage implements OnInit {
isDestinationSelected
=
false
;
mapClickedEvent
(
event
)
{
if
(
this
.
rideStarted
)
{
if
(
this
.
rideStarted
||
this
.
gotRouteOptions
)
{
return
;
}
//console.log(event.type, event.currentPointer.type);
var
coord
=
this
.
map
.
screenToGeo
(
event
.
currentPointer
.
viewportX
,
event
.
currentPointer
.
viewportY
);
console
.
log
(
coord
.
lat
+
'
,
'
+
coord
.
lng
);
console
.
log
(
coord
);
this
.
reverseGeocode
(
this
.
platform
,
coord
.
lat
,
coord
.
lng
);
this
.
destinationPosition
=
{
lat
:
coord
.
lat
,
lng
:
coord
.
lng
};
this
.
isDestinationSelected
=
true
;
...
...
@@ -887,10 +888,10 @@ export class HirebikePage implements OnInit {
};
geocoder
.
reverseGeocode
(
parameters
,
result
=>
{
var
streets
=
result
.
Response
.
View
[
0
].
Result
[
0
].
Location
.
Address
.
Street
;
var
houseNumber
=
result
.
Response
.
View
[
0
].
Result
[
0
].
Location
.
Address
.
HouseNumber
;
var
zipcode
=
result
.
Response
.
View
[
0
].
Result
[
0
].
Location
.
Address
.
PostalCode
;
var
streets
=
result
.
Response
.
View
[
0
].
Result
[
0
].
Location
.
Address
.
Street
||
''
;
var
houseNumber
=
result
.
Response
.
View
[
0
].
Result
[
0
].
Location
.
Address
.
HouseNumber
||
''
;
var
zipcode
=
result
.
Response
.
View
[
0
].
Result
[
0
].
Location
.
Address
.
PostalCode
||
''
;
this
.
searchValue
=
streets
+
'
,
'
+
houseNumber
;
return
streets
+
houseNumber
+
zipcode
;
},
(
error
)
=>
{
alert
(
error
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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