Image Overlay Inside with GUIDE built GUI (With Moving Animation based off given points)
Show older comments
I am building a GUI for class, that maps airports (recognized by ICAO codes), I have it to the point where I can show a map (just a simple image) and then zoom around the airports given so they don't see the whole map. I am having two problems. I wanted first to make sure the image fit into the desired axes which is pretty big, but that isn't the biggest problem. The main problem is I want a plane image over the map that starts at the first airport and flies to the second point, which can change depending on input. I did hard input for the ICAO codes at first, but I was trying to hold the image, and then show the other image, but it seems as if i need to share their 'Xdata' and 'Ydata', but when I try to get their xdata or ydata I run out of memory, and I am unsure if that could even work. Ideas on how to get this to work, or other approaches would be great. I can get it to display the plane, if I create a separate axes, but then I can't control the flight of the plane since it is based on a map in a separate axes.
This code was done in the opening function of the gui just for test case purposes.
axes(handles.map_axes);
imshow('chicago_sectional.png');
axis image
axis off
%TESTING BELOW
%test example of how the string %should be before being inputted
airport_list = ['KLAF';'KORD';'KOEB';''];
%Purdue Airpoit - KLAF
%O'Hare - KORD
%Another Airport - KOEB
%gets a box for map and x/y from custom made function that loads a database
[box, x, y] = database_grab(airport_list);
%sets axes to box around all icaos codes
axis(box);
line(x,y,'LineWidth',3,'Color','r'); %draws lines between points
%x is a vector of x coordinates [x1, x2, ..., xn]
%y is a vector of y coordinates [y1, y2, ..., xn]
%here i want to load 'plane.png' and have it fly from (x1,y1) to (x2,y2) and so on
%this should be done on top of the map and lines already displayed
All Necessary Reference Files are attached below (Some buttons won't work because this has a lot of connected GUIs that I removed for uploading this question): https://dl.dropboxusercontent.com/u/15272232/Matlab%20Files.zip
Answers (0)
Categories
Find more on Map Creation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!