Skip to content

Commit 18bc73f

Browse files
committed
Fixed error after google maps api change. Changed color of line
1 parent 9403679 commit 18bc73f

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

css/DrawDirectionOnMap.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,4 @@ padding: 5px 11px 0px 11px;
4848
font-family: Roboto;
4949
font-size: 13px;
5050
font-weight: 300;
51-
}
5251
}

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<head lang="en">
33
<meta http-equiv="content-type" content="text/html;charset=utf-8">
44
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
5-
<title>Drow Direction On Map</title>
5+
<title>Draw Direction On Map</title>
66

77
<!--Style-->
88
<link href="css/DrawDirectionOnMap.css" rel="stylesheet"/>

js/DrawDirectionOnMap.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ var markerColor = 'default';
2323
/**
2424
* Line Color
2525
*/
26-
var polyLineColor = '#FFCC00'
26+
var polyLineColor = '#E82087'
2727

2828

2929

@@ -55,16 +55,13 @@ function initialize() {
5555
}
5656

5757
var address = '';
58-
if (place.address_components) {
59-
place.address = [
60-
(place.address_components[1] && place.address_components[1].long_name || ''),
61-
(place.address_components[2] && place.address_components[2].long_name || '')
62-
].join(' ');
58+
if (place.formatted_address) {
59+
address = place.formatted_address;
6360
}
6461
var loc = place.geometry.location;
6562

6663
if(locations.length>0){
67-
locations.push([place.name, loc.A, loc.F, place.address]);
64+
locations.push([place.name, loc.G, loc.K, place.address]);
6865
console.log(locations);
6966
makeMap(googleMap,place);
7067
}else{
@@ -87,7 +84,7 @@ function initialize() {
8784
marker.setMap(googleMap);
8885
marker.setVisible(true);
8986

90-
locations.push([place.name, loc.A, loc.F, address]);
87+
locations.push([place.name, loc.G, loc.K, address]);
9188
}
9289

9390
});

0 commit comments

Comments
 (0)