Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem in setting size of image in mobile

 
feroz pasha
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am trying to display the google map in mobile using google API as user enter the location it will display the image for that code is

retriveStaticMap(width, height,longitude, latitude,zoom, format);


this.image = Image.createImage(gMap.retrieveStaticImage(35, 35, lanLng[0], lanLng[1], 10, "png32"));

for 35*35 image get displayed
but if i increase size from 35 to 35 it showing illegalArgumentException

as i am using sun java wireless toolkit 2.5.2
emulator as screen size of 240*291

if i resize the image to 240*291 it get blur

so pleeeeeeeeeeeeeeee give me solution
 
feroz pasha
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
STACK TRACE EXCEPTION I AM GETTING PL GIVE SOLUTION

java.lang.IllegalArgumentException:
at javax.microedition.lcdui.ImmutableImage.<init>(+11)
at javax.microedition.lcdui.Image.createImage(+40)
at GoogleMaps.retrieveStaticImage(+28)
at SimpleSlidingCanvas.<init>(+63)
at Example.startApp(+8)
at javax.microedition.midlet.MIDletProxy.startApp(+7)
at com.sun.midp.midlet.Scheduler.schedule(+270)
at com.sun.midp.main.Main.runLocalClass(+28)
at com.sun.midp.main.Main.main(+80)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic