06-04-2009 01:33 AM
Hi,
can i use google maps in blackberry application ?
i am using blackberry maps in my application, but blackberry maps does not have detailed maps of India. so i just wanna use google maps in
my application.
How can i use them ?
06-04-2009 03:38 AM
06-04-2009 03:42 AM
Hi simon,
I want to integrate google maps in my application using google maps api, i dont want to open google map application from my application. i think
what u have suggested me , is the code to launch google map application from any blackberry application.
Please suggest.
06-04-2009 03:53 AM
06-04-2009 03:55 AM
06-04-2009 10:32 AM
06-05-2009 11:37 AM
I am also trying to use Google maps in my application.
My idea is to get a map image from google using HttpConnection.
The URL is:
URL = "http://maps.google.com/staticmap?size=360x480&mapt
My HttpConnection is:
httpConnection = (HttpConnection)Connector.open(URL + ";deviceside=true");
The result is an IOException "Peer refused the connection" in TcpClientConnection. The same URL works fine in the browser in the emulator. If I store the returned GIF on my own server, I can display it in my app. So there is a problem with the URL.
Any idea what is going wrong?
I am working with the Storm emulator in Eclipse with the BlackBerry Component Pack 4.7.0.
06-05-2009 12:30 PM
pwerry wrote:
You can always implement a browser field and use the web maps API. Since public RIM APIs do not support reflection, you can't load componants of other modules even if you know the names, unless you link to them at compile time.
Just wanted to suggest a little correction here:
RIM APIs allow Class.forname() method and newInstance() methods. So if you know the class name of some other component, and that class has a public default constructor and you can cast that object into something you can link at compile time (eg Field, Vector, or worst case Object) you can use some of the methods of the class.
Of course you can not do everything that reflection allows, but some things should be possible.
06-05-2009 06:49 PM
Note that you will actually have to know something about the class you are instantiating. For example, you can't cast uour new Object to a Vector unless it actually extends Vector.
Of course the debugger comes in really useful here, to do this investigation.
06-07-2009 04:24 AM
A couple additions to adwiv's post.
Currently no reflection apis exist in the framework. You can't call Class.forName() and newInstance() with class names that exist outside of your module group and the RIM framework. It will throw an exception. In fact, even if your app is aware of other libraries compiled with your app, you can get exceptions by trying to load instances of library objects through Class.forName(). The casting symbol must also be known at compile time, so you can't cast to anything beyond what your app is aware of.
Let me know if that helps.