objectivehtml / Google-Maps-for-Craft

The complete geolocation toolkit for Craft CMS.
Other
94 stars 20 forks source link

Special Character (#) not being handled in static maps #45

Closed annieneel closed 8 years ago

annieneel commented 9 years ago

If an address has a unit or apartment number, Google returns a # and then the number. This is not being handled in the static map which takes in the full unencoded address. I added in a $url = str_replace("#", "%23", $url); right after $url = $this->url . '?' . $data->getParameters(); in the static maps service to catch this case, and it takes care of this issue just fine. Without this fix, the request 400's because the address cuts off at the # sign.