×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    Nov 2012
    Posts
    6

    Add image over map

    Hello,

    I want to add a small image over the map and allow the user to move the map (keeping the image static while moving the map). Then when the user taps the image, take the point where the image is on the map and add the image to it (maybe using createPoi()). Is this possible?

    Thanks,
    Fabian

  2. #2
    Nokia Developer Expert
    Join Date
    Mar 2012
    Posts
    65

    Re: Add image over map

    Hi Fabian,

    it should be pretty easy. Just position your image with "position: absolute" over the canvas. Then as you already pointed out you can use the createPoi to create a poi. You can easily calculate the lot/lang of the poi considering the center of the map (x,y and longitude, latitude of it are known) and the x,y coordinates of your image.

    Br,
    Leo

  3. #3
    Registered User
    Join Date
    Jan 2013
    Posts
    31

    Re: Add image over map

    Is it possible to have the image zoom in/out based on the map zoom level?
    I want to overlay the map with an image that occupies a specific area on the map (e.g. like a building).

    Thanks
    Tom

  4. #4
    Registered User
    Join Date
    Feb 2004
    Posts
    1,980

    Re: Add image over map


  5. #5
    Nokia Developer Expert
    Join Date
    Mar 2012
    Posts
    65

    Re: Add image over map

    Hi Tom,

    I'm not sure how to understand you. Do you want to show an image only for specific zoom levels? Could you please give a more precise example?

    Leo

  6. #6
    Registered User
    Join Date
    Dec 2012
    Posts
    10

    Re: Add image over map

    Isn't a shape a better fit for that kind of functionality? As i recently learned, you can use a shapeclick listener as well.

    Otherwise you might want to use the mapzoomchange listener to check when the map zoom level has changed, and change your image properties accordingly.

  7. #7
    Registered User
    Join Date
    Jan 2013
    Posts
    31

    Re: Add image over map

    Yes, I want it to act like a shape (shapes resize with zoom level because its shape and size are based on geolocations not pixels), but I need the details of an image.
    I can listen to the mapzoomchange event, but the only way I know of putting an image on a map is via a poi, but pois are always the same size no matter what zoom level.
    So I don't know how to put an image on the map which occupies the same geospace regardless off the zoom level. For example if I overlay the image of a football stadium, the more I zoom in the more of the stadium I will see and when I zoom out it will become so small that you can't see it.

  8. #8
    Nokia Developer Expert
    Join Date
    Mar 2012
    Posts
    65

    Re: Add image over map

    Every poi has a property "scale" which you can increase/decrease depending on your needs. 1 means original size and e.g. 0.5 is scaled down by two.

    Leo

  9. #9
    Registered User
    Join Date
    Jan 2013
    Posts
    31

    Re: Add image over map

    That works.

    Thanks

Similar Threads

  1. Image rotates if movie clip position changed before image loading
    By supriyaakg in forum [Archived] Flash Lite on Nokia Devices
    Replies: 2
    Last Post: 2010-12-30, 03:27
  2. Creating a javax.microedition.lcdui.Image Image on a J2Se environment
    By TacB0sS in forum Mobile Java Media (Graphics & Sounds)
    Replies: 5
    Last Post: 2010-08-24, 20:01
  3. Serious error in Nokia 6600: Hangs on Image.getRGB and Image.createRGBImage
    By appeal in forum Mobile Java Media (Graphics & Sounds)
    Replies: 6
    Last Post: 2007-09-12, 11:27
  4. Drawing Lines on an Image (image graphics object returns null)
    By nicenouman in forum Mobile Java General
    Replies: 4
    Last Post: 2006-09-21, 10:15
  5. Replies: 0
    Last Post: 2003-05-12, 17:38

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •