Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not passing optional props breaks map #2

Closed
2 tasks
ChavaSobreyra opened this issue Feb 5, 2018 · 1 comment
Closed
2 tasks

Not passing optional props breaks map #2

ChavaSobreyra opened this issue Feb 5, 2018 · 1 comment

Comments

@ChavaSobreyra
Copy link

ChavaSobreyra commented Feb 5, 2018

I'm submitting a ...

  • [x ] bug report
  • feature request
  • other (Please do not submit support requests here (see above))

Current behavior:
When you don't pass optional params, such as paths, the URL generator inserts it as undefined, which can break features

For example, here is a URL generated when I did not pass paths. https://maps.googleapis.com/maps/api/staticmap?center=26.39514,-80.08892&zoom=17&size=150x125&maptype=satellite&format=jpg&key=AIzaSyASPgHKMi6jZTcCvEibvZitZVhtj-Sl3O4&scale=1&language=en&markers=color:red|26.39514,-80.08892undefined

As you can see the URL ends with undefined, which breaks the marker. Remove the undefined at the end, and the marker renders properly.

Expected / new behavior:
If an param is undefined, it should not be inserted into the URL as such

Minimal reproduction of the problem with instructions:
Create static map, don't pass paths

@eperedo
Copy link
Owner

eperedo commented Apr 1, 2018

Hi,

Thanks for the report and sorry for the delay on this. Hopefully this should be fixed in 2.0.1

@eperedo eperedo closed this as completed Apr 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants