I have a KML-file with lots of data in it. I would like to show the data in a google map (or something similair) When the KML-file updates, I would like the google map to update. Is this possible?
What to you mean KML-file updates?
Are you generating the KML from your database so updates means that more points are inserted to your db?
Anyway if that's the case you can construct the browser to periodically ask the server if this KML is updated,retrieve it and finally remove the expired file from the map and show the new.
Because as far as i know there is no way you can "sync" the KML overlay automatically.
Related
TLDR: I want this, but I am happy to send the data in my database to google as it is created (any user can create a location on the map).
I need to create a lot of map markers on a google map for a website I am creating. Insertions and deletions will be required, but I will never need to filter the data. I found several links showing how to create this map to make it accessible through the use of google docs' spreadsheet, however I have a database of latitude/longitude coordinates in google app engine. My preferred method would be for google to host the map and me to send insertion / deletion queries to the map itself (as the map is constant for all users). This sounded exactly like fusion tables, but I couldn't actually find out how to do it programatically in fusion tables
I know how to create individual points on a map, but there will be a lot of points so sending every single point to the client will be way too slow. My backup plan is simply to use a quad tree and get the client to send the server the bounds of the map and reply with everything in there, but I suspect google has a better solution.
Depending upon the size of your data set and how many insertions and deletions you need to make each day, you might want to consider using the Fusion Tables API. You can do a "replaceRows" operation to swap out the entire table contents, or individual "insert" and "delete" calls. (Of course then your data is stored in Fusion Tables.)
You can then embed your map in the website of your choice, or even host it on Google Drive.
I would like to create a Map by the excel sheet values (.csv files too).
By using FusionTableLayer API, I think it is possible. At first step we could upload the excel values to the database. Then we create a map by the database annotated value. It is very good idea. This is what I wanted. But One thing is problem to me with FusionTableLayer API is google's Drive has been pointed for the fusion table. It means that all my business data will be shared with google. I don't want to be like that.
Instead of Google's drive My database has to be pointed out. From my database I would like to create a map with FusionTableLayer API. I have been searching through internet, I dont find this is possible. But I believe that it is possible. Please guile me to specify the way to trigger it out ?
Regards,
ArunRaj.
If you want to use your own database, then you cannot use the Fusion Table API as it's meant for the Google Infrastructure. You will have to find another API to take care of this.
One workaround I can suggest to you is to parse points you have as drawing objects for your map. So for each point, create new google.maps.Marker with the respective coordinates. Each region can be denoted with google.maps.Polygon, and lines with google.maps.Polyline. There's plenty more you can do, but it's just a bit more work, and possibly less secure depending on your implementation. Furthermore, you can also add info windows to each of those areas using the Google Maps API by attaching respective listeners to those objects created.
Hope this helps!
Via a script I write a single set of lat/long position information into a CSV file which updates meaningfully for me every 2-3 minutes. I can of course successfully import that file into GE Pro and drop a placemark on the map. Once having done that, I wish to save the map as a JPG. No issues with the manual "version" of what I need to do...
How can I automate the import of the CSV file and automate the saving of the resultant map as well? Each map will overwrite itself (can have same file name). I don't see where google has any command line interface to do something like this...
The final result will be, again, a map with the latest positioned placemark whenever I happen to access the jpg file.
Thank you
(I am aware of the Google Earth Fusion product. Am hoping not to have to go that route as my need is fairly simple, I think)
I know there's a very similar question about this, but the problem is still unresolved and seems like such a trivial thing one may want: for a given Google Map, with data coming from a Fusion Tables layer, I'd want to open all InfoWindows (tooltips) simultaneously.
Currently, you can open them individually by clicking each region on the map. The desired result would be like clicking them all while they stick around (not letting them close each other).
My goal is to show the map with all this information visible, not needing any interaction. I'm not aware of an easier way of showing labels in Google Maps, but I'd be delighted to hear another ways to approach it. At this point, I'd settle for not letting each InfoWindow close the rest, so then I could manually open them one after another.
There's not a direct way to do this as the FusionTableLayer doesn't expose the underlying structure of the data until you click on a feature.
Depending on the number of rows in the table, you could use Google Chart Tools to load the table directly, up to 500 rows, and generate your own infowindows based on the data returned. That is easy for point data, not as easy for polygons or polylines as you have to determine where to place the infowindow. And if you table uses geocoded data you will have to re-geocode them. If it uses KML you will have to parse the individual KML features in each row to determine where to place the infowindow.
So, it's doable but not super easy.
I am attempting to create an application that will allow a small group of users to subscribe" to a KML feed we produce. The users want to view the KML using Google Earth on their mobile devices which does not support "network links" (please add this...).
The KML contains several hundred different place marks with related information as wells about 30-40 polygons. I am using the HTTP protocol. So far, I can successfully perform the ClientLogin and get the authorization token, I can retrieve a list of user maps and find the one I am supposed to update. Now I'm stuck. Every single feature needs to be updated every time...I don't want to have to manually update every feature or delete each one and re-add. What I would really like is to just provide a KML document and tell it to just
replace ALL content in this map with this KML.....is this possible?
Summary:
Login, then...
Find a map with a specific name, then...
Replace that maps content with a KML file
I thought of just deleting the map and creating a new one with the
same name, but that might mess up the UI of the mobile device and
force the user to have to re-select the map every time I update them (every day). This is not completely out of the question, but it's certainly not ideal.
What is the best way to handle this?
Good question. I don't think the HTTP protocol allows for this in the way you suggested (login, find map, replace entire map with KML).
The delete and recreate method that you suggested in your comment might work, but you'll have to wait until issue 2590 is fixed to resolve the 400 BAD REQUEST problem. The workaround that Google suggest for this issue is to upload individual KML features as required, which really won't help you as that's exactly what you're trying to avoid!
See my answer on this similar question for more details.