Picasso won't load Google Static Map

I am trying to load a static map using this URL:

http://maps.googleapis.com/maps/api/staticmap?center=43.137022,13.067162&zoom=16&size=600x400&maptype=roadmap&sensor=true&markers=color:blue|43.137022,13.067162

I do this with Square Picasso, but it does not load.

In some tests, I have to conclude that char |is the one that messed up Picasso. Any idea on how to overcome this problem?

+4
source share
1 answer

Picasso seems to be expecting a URL-encoded URL. This means that the values ​​of the form variables must be encoded at the URL as they would if they were an HTML form.

- , URL- . , markers , , |, URL- .

URL , URLEncoder encode() .

+5

Source: https://habr.com/ru/post/1542304/


All Articles