Matlab kml to open in google maps instead of google earth - matlab

My matlab is generating a .kml file and it opens in google earth. Is there a way to change it to open in google maps instead.
And also to discount the first values which is an unknown number of 0,0
Thanks.
code
kmlwrite('routetraveled', B.data(1:elements,4), B.data(1:elements,5));
winopen('routetraveled.kml');
I use this to generate the .kml and open it.

I don't know if Google Earth supports it, but many apps allow you specify a file to load when you open the program. Instead of winopen, you would just make a command line call. Something like this:
!Path/To/Google/Maps --open filename.kml

Related

Download google trends data in MATLAB

I am trying to download google trends data using MATLAB. However, when I run the following command, I am not able to download the data.
!"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" http://www.google.com/trends/trendsReport?q=MSFT&geo=US&content=1&export=1&graph=all_csv
However, when I paste the URL part into google chrome it will download. How can I get this to work in MATLAB?
I'm assuming that you want the data in MATLAB. To do this, it is best to not make a system call to Google Chrome, but rather to use the tools integrated within MATLAB to do this such as websave.
So you'd want to do something like:
filename = websave('filename.csv', 'http://www.google.com/trends/trendsReport?q=msft&geo=us&cmpt=q&content=1&export=1')
That being said, this may be a little tricky because Google likely requires authentication for access to that page so you would need to use the weboptions input to provide the necessary credentials.

MATLAB GUI: Different results when opening a figure file using GUIDE and straightaway

I have made a MATLAB GUI but I am facing a problem. The problem is that when I open the GUI figure file straightaway, the resulting GUI does not work properly(I am guessing there is a problem with the loading of the opening_function). But when I open that figure file using GUIDE, I am getting proper results. I want the GUI figure to run properly when I click on it. I have provided the link for my GUI figure file and the M-file for the same in the below link using Google drive:
Google drive link for GUI figure file and code file (along with an image required for the working of the two)
your google drive link is not working. also if its your account of google drive which you have used to login then i can't access the files in it...use some other file hosting services to share the screenshot.
also you can always debug your callback functions using breakpoints to check why its not working properly.

How to use download openstreetmap file to serve a local map app?

I have download a partial area data file (OSM format) to local. I have a local server which not connect to internet. So I want to build a local map app only with local OSM file (I use OpenLayer js).
I searched openstreetmap.org wiki, but find no solution.
Is there any way or documentaton to solve this?
By "local" you mean local on your machine or a local web server?
First you need to generate map tiles. Then you prepare the map HTML, including the OpenLayers code. The tile URL should point to your tiles (in case of a local machine, just use the "file://" protocol for URLs).
Here's one way how you can generate tiles (you can skip some of the steps): http://braincrunch.tumblr.com/post/9921938947/maperitive-tutorial-a-hiking-web-map-in-ten-easy-steps
1) i have to create an API that connects to a locally downloaded openstreet map and does to following:
2) Given a GPS location display the location on the map.
3) Be able to display the route to the location and update while the individual is on the move.
Numbers 2) and 3) are not yet my problem. number 1) is my problem for now. i don't even know where to start. i have been searching but still saw nothing i can understand.
what i want to know is: where to download OSM that i would be able to use locally? an example or a tutorial on an API that connects to the map locally and able to display it(and maybe able to zoom in, zoom out)?
the API can be in java, c#, or c++. but any other language is welcome as i have no choice.

Making a map for iPhone based on pre-prepared google map

my client prepared google map with points on. Now he wants that points on map in iPhone app. Is there way to export points from map prepared by him ?
If your client prepared the map in Google Maps, then he can use the "KML" link in his Google Map to download a file with all his data points in it, in KML format.
Did he use javascript to prepare the points and can you get that? If so, use the source.
Did he use maps.google.com to prepare it by dropping points on that? If so, click the URL button and you'll should see the points embedded in the URL, at least that is true for driving directions.

Using Perl to Display GPX File on Google Map

I have a bunch of GPX files on our server and would like to overlay them on top of a Google Map to display them on our website. We use Perl for all our site scripts however we're having a hard time figuring out how to format the data correctly to display it in Google Maps.
I'm hoping that some GPX expert out there can explain at a high level how we can best accomplish this and provide some sample perl code to correctly process the GPX file and print out the necessary HTML to display it on a Google Map.
Thanks in advance for your help!!!
The tool you really want to use is GPSBabel. If you want a somewhat perlish interface to it, rather than just driving it from the commandline, there's also a GPS::Babel module.