Fix a typo, and add missing country placeholder into here maps

This commit is contained in:
Hadi Nategh 2016-05-25 12:56:28 +02:00
parent 4aaee9acd2
commit 1f61249d3c
2 changed files with 3 additions and 3 deletions

View File

@ -544,7 +544,7 @@ class addressbook_hooks
}
// geolocation pre-defined maps
$geoLocation = array(
array('id' => 'https://maps.here.com/directions/drive{{%sr=/%sr}}%s0,%t0,%z0,%c0{{%d=/%d}}%s1,%t1,%z1', 'label' => 'Here Maps'),
array('id' => 'https://maps.here.com/directions/drive{{%sr=/%sr}}%s0,%t0,%z0,%c0{{%d=/%d}}%s1,%t1,%z1+%c1', 'label' => 'Here Maps'),
array('id' => 'http://maps.google.com/{{%sr=?saddr=%sr}}%s0+%t0+%z0+%c0{{%d=&daddr=%d}}%s1+%t1+%z1+%c1', 'label' => 'Google Maps'),
array('id' => 'https://www.bing.com/maps/{{%sr=?rtp=adr.%sr}}%s0+%t0+%z0+%c0{{%d=~adr.%d}}%s1+%t1+%z1+%c1', 'label' => 'Bing Maps')
);

View File

@ -996,10 +996,10 @@ app.classes.addressbook = AppJS.extend(
]
];
var src_param = url.match(/{{%sr=.*%s}}/ig);
var src_param = url.match(/{{%sr=.*%sr}}/ig);
if (src_param[0])
{
src_param = src_param[0].replace(/{{$sr=/,'');
src_param = src_param[0].replace(/{{%sr=/,'');
src_param = src_param.replace(/%sr}}/,'');
url = url.replace(/{{%sr=.*%sr}}/, src_param)
}