Skip to content

Commit

Permalink
fix; mapquest geocode pound sign
Browse files Browse the repository at this point in the history
  • Loading branch information
Jhays10 committed Jul 14, 2015
1 parent 3a508bd commit e8e19b8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions wheredat.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
var API_KEY = param('key')

if (service === "mapquest") {
document.write('<script src="'+location.protocol+'//www.mapquestapi.com/sdk/leaflet/v1.0/mq-map.js?key='+ API_KEY +'"><\/script>');
document.write('<script src="'+location.protocol+'//www.mapquestapi.com/sdk/leaflet/v1.0/mq-geocoding.js?key='+ API_KEY +'"><\/script>')
document.write('<script src="'+location.protocol+'//www.mapquestapi.com/sdk/leaflet/v1.s/mq-map.js?key='+ API_KEY +'"><\/script>');
document.write('<script src="'+location.protocol+'//www.mapquestapi.com/sdk/leaflet/v1.s/mq-geocoding.js?key='+ API_KEY +'"><\/script>')

isMapQuest = true
} else {
Expand All @@ -34,6 +34,7 @@
geocode: function (address, country, city) {
if (!isMapQuest) jsonp('?countryCode='+(country || 'US')+'&q='+address)
else {
address = address.replace(new RegExp('#', 'g'), 'no.')
if (!country || !city) MQ.geocode().search(address).on('success', function(e) { window._wheredat_res(e.result.best) })
else MQ.geocode().search({ country: country, street: address, city: city }).on('success', function (e) { window._wheredat_res(e.result.best) })
}
Expand Down

0 comments on commit e8e19b8

Please sign in to comment.