Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Contributor
Posts: 25
Registered: ‎06-17-2010
My Device: 9000
My Carrier: Vodafone

Re: problem in getting google maps static image

@Harsha Yes Its working perfectly in J2ME

but not working @BB

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: problem in getting Google maps static image

[ Edited ]

I have just done a GET using the following URL from a test program in the SImulator.

 

http://maps.google.com/maps/api/staticmap?center=40.714728,-73.998672&zoom=12&size=400x400&sensor=fa...

 

 I got 67563 bytes of data back - and the data seems to have a PNG header.   I've not tried to interpret it.

 

The URL was chosen because it is one of the sample ones from the documentation here:

http://code.google.com/apis/maps/documentation/staticmaps/

 

I used ";deviceside=true" because I was running in the Simulator.

 

@ pavandriod, remember that J2ME communication code may need to be modified to append the connection string:

http://supportforums.blackberry.com/t5/Java-Development/Different-ways-to-make-an-HTTP-or-socket-con...

Trusted Contributor
Posts: 134
Registered: ‎05-31-2010
My Device: 8300
My Carrier: vodqafone

Re: problem in getting Google maps static image

Peter Thank You very much.

 

 The problem is with the url.My previous url is something like

 

http://maps.google.com/maps/api/staticmap?zoom=14&size=480x360&maptype=roadmap&markers=color:blue|la...Smiley Frustrated

 

The url provided by you is different.That worked....One thing i'm still in confusion is the URL stated above is a working url and also working fine in J2Me devices.So why it is not workling in Blackberry.What is the difference?

 

 

Thanks & Regards,

Sree Harsha.P

Trusted Contributor
Posts: 134
Registered: ‎05-31-2010
My Device: 8300
My Carrier: vodqafone

Re: problem in getting Google maps static image

[ Edited ]

Peter ,I have to point out the position of the particulat location(using marker).So i prefered URL

 

http://maps.google.com/maps/api/staticmap?zoom=14&size=480x360&maptype=roadmap&markers=color:blue|la...Smiley Frustrated

 

But the marker url is not working in Simulator.And url provided by you works in simulator but doesnt contain marker of a location.

 

http://maps.google.com/maps/api/staticmap?center=43.4631,-80.5207&zoom=14&size=480x360&sensor=false

 

i also tried

 

http://maps.google.com/maps/api/staticmap?center=43.4631,-80.5207&zoom=14&size=480x360&maptype=roadm...Smiley Frustrated

 

So,once check with urls provided by me whether working for u or not.?

 

 

Thanks & Regards,

sree harsha.P

 

 

 

 

Highlighted
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: problem in getting Google maps static image

Apologies for delay, I have been away.

 

I tested the following URL:

 

http://maps.google.com/maps/api/staticmap?center=Williamsburg,Brooklyn,NY&zoom=13&size=400x400&
markers=color:blue|labelSmiley Frustrated|11211|11206|11222&sensor=true

 

This link is supplied in the API documentation, and displays location markers.  Again I did not display the result, but I received 56834 bytes  back and there seems to be a PNG header to what looks like image data.  . 

 

Can you see if the URL provided in the API doc works for you, and if it does, perhaps compare it to what you are providing to see if you spot a difference?