Plotting Image on a Map

I know that the MapKit API contains the functionality to place pins on a MapView, but is there any way to plot a small image (GIF, JPEG, etc) at a GPS coordinate?

http://discussions.apple.com/thread.jspa?threadID=1994597&tstart=0

Similar Messages

  • Reposted ---- Cannot plot Ovals on the Map on mouse Clicks

    Hi all...
    I am able to load the map of the South Pacific but I am not able to plot ovals on it . The following is my cod and the exception is also given below the code when i click the mouse. code is based on java 1.5 sdk
    Please could anyone correct me with the correct code so that i am able to load the map and click the mouse to draw the points. I am having no knowledge of Java so we have to learn on out own to do this project.
    Cheers
    Jitendra
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.image.*;
    import javax.swing.*;
    public class Map extends JPanel {
    protected ImageIcon icon;
    protected Point fp;
    protected Point tp;
    Graphics grf;
    public static void main (String[] args) {
    if (args.length == 0) {
    System.out.println("You must specify the name of an image file");
    return;
    Map editor = new Map(args[0]);
    JFrame f = new JFrame(args[0]);
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    f.setContentPane(editor);
    f.setSize(800, 700);
    f.setVisible(true);
    public Map(String name) {
    super();
    setLayout(new GridLayout(1,1,0,0));
    icon = new ImageIcon(name);
    JLabel label = new JLabel(icon);
    label.setHorizontalAlignment(SwingConstants.LEFT);
    label.setVerticalAlignment(SwingConstants.TOP);
    label.addMouseListener(new MouseAdapter() {
    public void mousePressed(MouseEvent event) {
    handleMouseDown(event);
    label.addMouseMotionListener(new MouseMotionAdapter() {
    public void mouseDragged(MouseEvent event) {
    handleMouseDrag(event);
    JScrollPane jsp = new JScrollPane(label);
    add(jsp);
    protected void handleMouseDown(MouseEvent ev) {        
    tp = ev.getPoint();
    grf.setColor(Color.blue);
    System.out.println("Tp " + tp);
    grf.fillOval(tp.x,tp.y,15,15);
    repaint();
    protected void handleMouseDrag(MouseEvent ev) {
    tp = ev.getPoint();
    public void paintComponent(Graphics g){
    this.grf = g;
    g.drawLine(fp.x,fp.y,tp.x,tp.y);
    g.fillOval(fp.x,fp.y,15,15);
    g.fillOval(tp.x,tp.y,15,15);
    }

    Who knows what the OP is doing with this posting. The same question with formatted code is found here:
    http://forum.java.sun.com/thread.jspa?threadID=659765&tstart=0

  • Generation of images of the map

    Hi,
    Some images of my map, are created with a box gray with a button to close. This seldom occurs and for a few levels of zoom.
    After I clear the cache of the level of zoom they are generated successfully.
    Is there as detect situation in the application?
    Thank you.

    Any help would be appreciated. I'm sorry I don't know much about how the classpath works and how data is loaded upon running a program, I've been raised in the safe environment of IDE's and buttons to click to run my programs.. :) Then you need to read the applicable class/classpath documentation here:
    [http://java.sun.com/javase/6/docs/technotes/tools/index.html#general]
    and this:
    http://java.sun.com/javase/6/docs/technotes/guides/lang/resources.html

  • Cannot plot Ovals on the Map on mouse Clicks

    Hi all...
    I am able to load the map of the South Pacific but I am not able to plot ovals on it . The following is my cod and the exception is also given below the code when i click the mouse. code is based on java 1.5 sdk
    Please could anyone correct me with the correct code so that i am able to load the map and click the mouse to draw the points.
    Cheers
    Jitendra
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.image.*;
    import javax.swing.*;
    public class Map extends JPanel {
       protected ImageIcon icon;
       protected Point fp;//start = new Point(0, 0);
       protected Point tp;//finish = new Point(0, 0);
       Graphics  grf;
       public static void main (String[] args) {
          String file = "../pic/Pic2.JPG";
          if (args.length == 0) {
             System.out.println("You must specify the name of an image file");
             return;
             //args[0] = file;
             Map editor = new Map(args[0]);
             JFrame f = new JFrame(args[0]);
             f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
             f.setContentPane(editor);
             f.setSize(800, 700);
             f.setVisible(true);
             //f.getContentPane().add(editor);
       public Map(String name) {
          super();
          setLayout(new GridLayout(1,1,0,0));
          icon = new ImageIcon(name);
          JLabel label = new JLabel(icon);
          label.setHorizontalAlignment(SwingConstants.LEFT);
          label.setVerticalAlignment(SwingConstants.TOP);
          label.addMouseListener(new MouseAdapter() {
             public void mousePressed(MouseEvent event) {
                handleMouseDown(event);
             public void mouseReleased(MouseEvent e){
                    /*tp = e.getPoint();
                    grf.setColor(Color.blue);
                    System.out.println("Tp " + tp);
                    //grf.drawLine(fp.x,fp.y,tp.x,tp.y);
                    //grf.fillOval(fp.x,fp.y,15,15);
                    grf.fillOval(tp.x,tp.y,15,15);
                    repaint();*/
          label.addMouseMotionListener(new MouseMotionAdapter() {
                    public void mouseDragged(MouseEvent event) {
                            handleMouseDrag(event);
          JScrollPane jsp = new JScrollPane(label);
          add(jsp);
       protected void handleMouseDown(MouseEvent ev) {
          //if((ev.getModifiers() & InputEvent.BUTTON1_MASK) != 0) {
             //start = event.getPoint();
             //finish = event.getPoint();
             tp = ev.getPoint();
             //System.out.println("fp " + fp);
             grf.setColor(Color.blue);
             System.out.println("Tp " + tp);
                    //grf.drawLine(fp.x,fp.y,tp.x,tp.y);
                    //grf.fillOval(fp.x,fp.y,15,15);
                    grf.fillOval(tp.x,tp.y,15,15);
             //repaint();
             //System.out.println("Finish " + finish);
       protected void handleMouseDrag(MouseEvent ev) {
          //finish = event.getPoint();
          //tp = ev.getPoint();
          //System.out.println("DragFinish " + finish);
          //repaint();
       public void paintComponent(Graphics g){
       /*if (image == null){
                    image = createImage(getWidth(),getHeight());
                    grf   = image.getGraphics();
                    grf.setColor(getBackground());
                    grf.fillRect(0,0,getWidth(),getHeight());
                    //g.drawImage(image,0,0,null);
                    //g.setColor(dfltcolor);
                    //grf   = icon.getGraphics();
                    this.grf = g;
                    g.drawLine(fp.x,fp.y,tp.x,tp.y);
                    g.fillOval(fp.x,fp.y,15,15);
                    g.fillOval(tp.x,tp.y,15,15);
    }/* Exception
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    at Map$1.mouseReleased(Map.java:50)
    at java.awt.Component.processMouseEvent(Component.java:5488)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
    at java.awt.Component.processEvent(Component.java:5253)
    at java.awt.Container.processEvent(Container.java:1966)
    at java.awt.Component.dispatchEventImpl(Component.java:3955)
    at java.awt.Container.dispatchEventImpl(Container.java:2024)
    at java.awt.Component.dispatchEvent(Component.java:3803)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
    at java.awt.Container.dispatchEventImpl(Container.java:2010)
    at java.awt.Window.dispatchEventImpl(Window.java:1774)
    at java.awt.Component.dispatchEvent(Component.java:3803)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    */

    Roughly put, don't access Graphics object outside the
    paintComponent() method.
    And, don't use Graphics object other than that is
    passed as the argument of the
    paintComponent() method for painting on the
    component.
    If you want to draw on an Image object before
    painting it on the component, use BufferedImage
    and the Graphics object gotten from its method. After
    that, use g.drawImage() method in the
    paintComponent() method.
    Your grf variable is complete nonsense.
    Delete it.
    Most importantly: learn Java GUI programming basics
    before anything else.
    See:
    http://java.sun.com/docs/books/tutorial/uiswing/index.
    htmlThanks very much but how I gonna use to load the image...since I haven't done any java before this is my first time as it is required in my project........pls some one help me.........

  • Can't plot image into WDT waveform graph

    I'm trying to plot an icon onto a WDT waveform graph but it doesn't seem to be working. The image plots while using the default (array of doubles) data type, but goes missing when I change to WDT. As far as I can tell, the two graphs are the same except for their data type.
    Am I missing a step or is this a LabVIEW bug?
    Attachments:
    WDT problem.vi ‏26 KB

     I was able obtain the icon on the WDT waveform graph in your code by changing the property selected on its property node to PlotImages.Middle.

  • Images in Flash Mapping Client??

    Hi,
    Now, I'm working with Mapviewer using the Flash mapping Client. It works quit well. I'd like to know if you can insert an image like a JPG or GIF.
    Thanks

    Hi,
    What a pity!! :-( We work with aereal images and it is very important for us to work with them.
    Do you know if the next version would support it?
    Thanks
    Regards.

  • Putting a contour image on a map

    Hi there,
    I am very new to Java 2d, and if someone can help me tell the basic steps/API I should look at to take a contour image ( basically contour lines on a white background) and overlay them on a map image.
    What is confusing to me is how to define the shapes of the contours lines to overlay on the map, (its random).
    Till now I get an image and overlay on each other via something like following:-
    BufferedImage im2 = ImageIO.read(imageURL);
    Graphics2D g = im.createGraphics();
    g.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.4f));
    g.drawImage(im2, (im.getWidth()-im2.getWidth())/2, (im.getHeight()-im2.getHeight())/2, null);
    g.dispose();
    however the above produces 2 semi-transparent images overlaying each other, I want the specific contour lines to overlay on my map image but not the white background on which the contour lines are on orginally.
    thanks,
    nandita.

    Unfortunately Java only provides the one implementation of Composite, which is really quite frustrating.
    You have two solutions.
    Firstly, and this is the most effective solution but may be tricky depending on your source data, don't use white as the background: use transparent pixels. Then you can just slap the image on top without using a composite and get the exact effect you want. If you have antialiased contours then the antialiasing needs to be performed in the alpha channel.
    Alternatively, you want a "multiply" style composite, where the output is the source multiplied by the overlay. I did write one a while back, I think I basically I rummaged round on the web for a different composite implementation to get the overall gist of it and then yanked out the guts of it and wrote the multiply algorithm.
    The only thing you need to bear in mind is this,
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4833528
    which means if you implement a custom composite you can only use it to render to off-screen images.
    Actually, there is a way of getting the first solution even if you're loading images with white backgrounds, and that's to write a small algorithm to manipulate the image to convert white pixels to transparent ones - you can probably maintain any antialiasing as well. Shouldn't be hard to write - though it will obviously have a performance hit at conversion time.

  • Problem Loading images in Google/Mapping sites

    I have recently bought an iMac, and find that when I search using Google Images, the thumbnails do not load, and the "loading" icon stays pretty much indefinitely.
    I also have problems when using mapping in Multimap/Bing/Google Earth, in that the images again do not load properly much of the time.
    This is extremely frustrating as these are functions that I use all the time. I downloaded Google Chrome to see if the problem was in Safari, and got the same result, so the problem appears to be in the operating system.

    I have since found this thread:
    http://discussions.apple.com/thread.jspa?threadID=2199926&start=0&tstart=0
    ...which suggested that the problem is with the router firewall, and suggests adjusting it. Mine's a Belkin (ADSL Modem with Wireless G Router), which seems to only have an "on/off" option on the firewall.
    I tried turning it off, and the images now seem to load normally. However I am not happy about leaving the router with no firewall... anyone got any ideas for more specific configuration of the firewall?

  • Image Sizing and Mapping

    Hi,
    I am trying to create a navigation bar here, and I have one
    image for the entire navigation. It includes home, about us, etc.
    Now I want the image to always fill the horizontal and vertical
    aspects of the users browser, so using percentages I accomplished
    that. Now I want to map the image so when someone clicks the home
    or about us area it leads to a frame below, now when the image size
    changes due to variances in the browsers and resolution, the
    mapping stays in the same area while the image changes and in
    affect the buttons are not in sync with the mapping. What fixes are
    there to this?
    Thanks in advance!

    Create basically 3 images. A center image with all of your
    navigation that
    never changes size and a left and right background image that
    stretches when
    the browser size changes.
    But, better than that, don't put your navigation images as
    part of the
    image. Use css styles to create your links with text links
    and image
    backgrounds that can float over your stretching background
    image.
    Text links always work better and give the search engine
    crawlers something
    to look at. They can't see image links (or won't look at
    them.)

  • Image pixelates when mapped onto 3D object

    I have created a bottle by revolveing an object in Illustrator.  I created a custom sybol and that is not pixelated at all.  The symbol is made of text and an image. To the left is the symbol before it is mapped. As you can see the leaf is not pixelated, but once it is mapped it gets pixelated and blury as seen to the right. Does anyone know why this is and how to fix it!!!??

    Check your document raster effects settings. You may actually see something with an effect inside the symbol being wrongly rasterized...
    Mylenium

  • How to Show custom image  on Google Map Oracle Apex 4.1 page

    Hi.. All,
    Need to show custom Image (From Database Table which is a BLOB Column) as Marker on Google Map with fixed size if we zoom in or zoom out.
    I am using Apex 4.1 and oracle11g r2.
    Thanks in Advance

    Hello,
    This plugin Does Exactly What You Need.
    http://www.apex-plugin.com/oracle-apex-plugins/item-plugin/extension-warp11-gmaps-item_109.html
    Please read the comments on the plugin, in case you come across problem in running the plugin....
    Best Regards,
    Fateh
    If you believe that my answer was correct, then please mark the answer as correct. This is for the best of all

  • How can I use or convert a imaq image to plot images back on waveform graph

    Hi
    I am currently opening and manipulating (rotate and resize) a PNG image using IMAQ Vision in LabView 8.2.1 This works well and I can display the Image on the front panel using a IMAQ Image Control.
    In addition to this I would now like to display the image as a background on waveformgraph. I can do this with the original PNG file by reading it and then flatten it to a pixmap ie make it a Picture but this is of little use as I need to use the manipulated IMAQ image.
    Therefor I would like to know how to convert the manipulted IMAQ Image to right Picture Format (without resaving) in order to use it on the PlotImages.Back property node of a wavefrom graph.
    I very much welcome your suggestions as I feel it should be easy yet can not seem to solve it. Thank you for your time!!!

    Hi Randall
    Apologies for replying somewhat late but I have been out of the office for a few days.
    Your suggestions and code helped me greatly and led to solving my query so thank you for that.
    There is one more thing (well many many more but I will place new posts for those  however that you might be able to answer for me.
    Following your suggestion to use the image to array function I searched through more examples and found the code that did exactly what I wanted to do. Please see attached.
    In this code a For loop is used to add 65793 to the color table. It works very well but I do not know why it is used exactly. Can you exlplain? I also realize I never made it clear that I use grayscale PNG files rather then color images.
    Thanks again for your excellent help, it is much appreciated.
    Attachments:
    IMAQ_8-bit_to_picture v1.vi ‏15 KB
    Test Image.png ‏42 KB

  • Using IMAQ create, set-up, acquire and windraw to save image without color map

    Hi,
    Attached is my VI (using labview 8.5) and am not sure where it is getting the color info from, but it saves the image as jpeg/bmp/tiff with colormap (confirmed by imread in matlab). Can someone help me save these images without colormap info.
    Thanks
    Attachments:
    HL Grab with two boards and SONY XC55_Images.vi ‏166 KB

    Hi Maverick269,
    I noticed that you posted this question over on the Machine Vision forums as well. That will definitely be a better place to get this question answered, so let's work on the issue over there :
    http://forums.ni.com/t5/Machine-Vision/Using-IMAQ-create-set-up-acquire-and-windraw-to-save-image/m-...
    In the future it helps us stay organized if we limit each issue to a single thread.
    Cheers,
    Andy C.
    Applications Engineer
    National Instruments 

  • SRM-MDM Catalog image mapping

    Dear All,
    I am trying to map image field but the field does not appears on the web dynpro user interface, can anyone advise me how to map image field in order to display the images in SRM.
    And I am using standard Repository SRM-MDM.
    Regards,
    Aklilu

    Hi Aklilu,
    Hope you have followed the following steps.
    You have created the mask containing Image field and mapped to the end user say User1.
    In the WebDynpro UI config logged in as UI Configuration Manager.
    Go to Customize Display tab
    Select Result set radio button
    Select the image filed and add to the display item.
    The problem would be you might have included Image field in the webdynpro and forgot to include the Image field in the Mask.
    The fact is that the display fields assigned to the user can be over ridden by the mask assigned to the user.
    Please check the fields in the Mask and field added using Webdynpro UI Config for the end user.
    Thanks,
    Arun Prabhu S

  • Image map rendered correctly in Firefox, but with problems in chrome & IE

    Hi All,
    I have created a simple application with JSF 2.0.
    The page is made by an image with a map. Clicking on the hotspot another page is shown.
    I use a graphicImage tag with reference to a map with some link "hotspots".
    Everything works fine in Firefox.
    But, in Chrom the Image is shown, but the hotspot is not there....
    In IE, the page does not open up, and I'm prompted for the download of the file (!?).
    Any help? what I'm doing wrong?
    Thanks in advance,
    Giorgio

    The code is something like the following:
    <?xml version='1.0' encoding='UTF-8' ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"
          xmlns:ui="http://java.sun.com/jsf/facelets"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:f="http://java.sun.com/jsf/core">
        <!--      xmlns:scrum="http://java.sun.com/jsf/composite/components">    -->
        <f:view>
            <html>
                <h:head>
                    <title>My Title</title>
                </h:head>
                <h:body>
                    <h:graphicImage
                        id="in" alt="Image not found"
                        value="/resources/images/in.png"
                        ismap="True" usemap="#enter" >
                    </h:graphicImage>
                    <map name="enter" id="enter">
                        <h:link shape="rect" coords="250, 320, 300, 340"
                                outcome="st" />
                     </map>
                </h:body>
            </html>
        </f:view>
    </html>

Maybe you are looking for

  • Best practice for responding to keyDown event

    I am writing my first Cocoa application.  It's a simple utility app -- a calculator.  I've got everything working, the last thing I want to add is I want the app to respond to key press events.  So, you could click the "4" button with the mouse, or y

  • Max no of items reached in FI

    Hi, we have 470 lines in delivery and "Max no of items reached in FI" comes up during post goods issue. The goods have physically left the dock. Is there a way to get around this and do a PGI. I have looked at the OSS note_0001171573_max_num_GI-Items

  • IPhoto to Aperture

    I've been using iPhoto for years with my library of family photos (over 9500.) Thinking of going to Aperture on the recommendation of friends. If I covert my iPhoto library 9.1.1 to Aperture library will I have the same capabilities to use the photos

  • Getting Interaction center as the default page on the SAP CRM 7.0 webui

    Hi, I have installed SAP CRM 7.0 and done all the basic things. I have assigned Sales Professional and Marketing Professional PFCG roles to my user in SU01. Now when I logon to webui, I am getting interaction center(with all the accept, reject, etc..

  • WPC Menu Focus not working

    I created a WebPage using WPC and integrated the Navigation site to ESS Role. When I click the ESS menu the WPC Page opens up but the focus of the main menu moves to next menu(MSS) . I see a Javascript error 'children' is null or not an object. I fol