B bluedude Well-Known Member Licensed User Longtime User Jan 6, 2011 #1 Hi, I'm trying to use this URL: http://maps.google.com/maps/api/sta...r:blue|label:I|52.327065,4.882114&sensor=true to get a static map in an imageview. However, B4A says this one contains illegal characters. I also tried an encoded version but then I get a connection error. With a normal imageurl it works fine. Any suggestions?
Hi, I'm trying to use this URL: http://maps.google.com/maps/api/sta...r:blue|label:I|52.327065,4.882114&sensor=true to get a static map in an imageview. However, B4A says this one contains illegal characters. I also tried an encoded version but then I get a connection error. With a normal imageurl it works fine. Any suggestions?
Erel B4X founder Staff member Licensed User Longtime User Jan 6, 2011 #2 How are you using this Url? Upvote 0
B bluedude Well-Known Member Licensed User Longtime User Jan 6, 2011 #3 Url Response.GetAsynchronously I use it in with that method to get that image. Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Jan 7, 2011 #4 The browser automatically encodes this url correctly. You should only encode the parameters. Not the whole url. Try: B4X: url = "http://maps.google.com/maps/api/staticmap?center=52.327065,4.882114&zoom=13&size=90x90&markers=" & su.EncodeUrl("color:blue|label:I|52.327065,4.882114","utf8") & "&sensor=true" Upvote 0
The browser automatically encodes this url correctly. You should only encode the parameters. Not the whole url. Try: B4X: url = "http://maps.google.com/maps/api/staticmap?center=52.327065,4.882114&zoom=13&size=90x90&markers=" & su.EncodeUrl("color:blue|label:I|52.327065,4.882114","utf8") & "&sensor=true"
B bluedude Well-Known Member Licensed User Longtime User Jan 7, 2011 #5 su.encodeurl What is su.encodeurl? Upvote 0
B bluedude Well-Known Member Licensed User Longtime User Jan 7, 2011 #6 StringUtilities Found it, stringutilities. Upvote 0
B bluedude Well-Known Member Licensed User Longtime User Jan 7, 2011 #7 Like a charm Erel, Thanks, works like a charm. Upvote 0