Skip to content

Static image marker fixes#836

Closed
freszu wants to merge 2 commits into
mapbox:masterfrom
freszu:bug/static-image-marker-fixes
Closed

Static image marker fixes#836
freszu wants to merge 2 commits into
mapbox:masterfrom
freszu:bug/static-image-marker-fixes

Conversation

@freszu
Copy link
Copy Markdown
Contributor

@freszu freszu commented Jun 8, 2018

New version of Mapbox static map utils 3.x caused a few issues for us that should solve it.
Old working link from 2.x:

https://api.mapbox.com/styles/v1/username/styleId/static/pin-l+ff0000(-115.255990,36.263328),pin-l+ff0000(-115.255990,36.263328)/auto/800x300?access_token=token&logo=false

New failing link from 3.x:

https://api.mapbox.com/styles/v1/username/styleId/static/pin-l-ff0000(-115.255990,36.263328),null/auto/800x300?access_token=token&logo=false

PR contains:

  • Fix string format for color
  • remove useless null check - TextUtils already does that
  • Fix wrong link generated when 2 pins are in the same location have same size and color - old behaviour was creating proper link, new one fails silently generating illegal url by placing null as second pin. This was the result of indexOf call which was also removed because its a waste of cpu cycles.

@osana
Copy link
Copy Markdown
Contributor

osana commented Jun 12, 2018

Thank you for your contribution. I will port your PR to be merged

osana pushed a commit that referenced this pull request Jun 14, 2018
@osana osana mentioned this pull request Jun 14, 2018
osana pushed a commit that referenced this pull request Jun 15, 2018
osana added a commit that referenced this pull request Jun 19, 2018
@osana
Copy link
Copy Markdown
Contributor

osana commented Jun 19, 2018

merged by #839

@osana osana closed this Jun 19, 2018
@osana osana mentioned this pull request Jun 20, 2018
13 tasks
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

Successfully merging this pull request may close these issues.

2 participants