Is it possible to customize fusion table( should point my database ) to use fusionTableLayer? - google-maps

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!

Related

Google Maps API: How to calculate the building surface area?

In google maps, we can see a building footprint displayed. But how can we get this building outlines details via the Google Maps API? I know you have an easy algorithm to calculate a surface area in m2 via maps, but there you have to put in your data points manually.
Is there a functionality in the API where you can get the building outline details?
I've spend some time looking for the functionality in the API, not finding it... If someone could give me a hint if this functionality exists or not, I know if I have to focus on image-processing :)
Thanks in advance!
Here is similar question on SO. Hope it will help.
EDIT
There is also another way of getting building coordinates. You can use data extracted from OSM http://www.openstreetmap.org.
Select area and export .osm file.
The file has xml structure. Inside you will find nodes with associated coordinates. Rest of the file usually contains objects which could be tagged as building. Objects are described by set of references to nodes so you will have to follow the references and find out coordinates.

Appengine Fusion tables programmatically creating many map markers

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.

Google or Bing maps API - creating and using your own map

What I need is the following.
Whenever I add any instance of object in my website, I need the server to add the location of the object to my own map either in Google maps or Bing maps (Bing maps docs are more clear therefore I'm going to use Bing).
Later, whenever I view the object in my site, the map should point to the location of the object and other my map objects in the same map.
How can this be achieved? Do I need to hold all the coordinates and object descriptions in my server, or somehow it is saved in the google or bing.
I went through the docs, but couldn't find any information I need.
You need to store them on your server and load them into the map on your webpage. There are ways with both google (fusion tables) and bing (spatial data services) of storing them with the provider but if you are already storing a copy for your website you are better off keeping them there for the map rather than maintaining two copies.
I'm not sure how technical you are but this best architecture approach is this:
1) Write a database query that finds objects to show on your map, ideally filtered by whatever the user can use to filter objects elsewhere on your site. Add to this query a filter by geographical bounding box (the range of latitude and longitude that can be seen on your map at any one point). The bounding box filter is just a simple sql BETWEEN clause but will mean you dont have to load every single object on to the map.
2) write a "webservice" that uses the database query in 1) and turns the results into JSON. This approach will lead to a much cleaner seperation between your mapping code in javascript and your server side code in the webservice.
3) Write your mapping frontend in Bing using javascript and use something like Jquery to read data from the webservice as the map is moved around re-load data that know should be shown on the new map view. As the data will be in JSON its much easier as JSON will just give you javascript versions of your objects

Google Maps Data API - Upload KML / Replace Map Content

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.

How can i get real-time tracking results?

We are trying to achieve is to collect fake gps tracks on some route without going in real time.
We first realized by using maps.google.com we can download kml file from any direction between designated points.But these points depend on shape of the road where if we go through a bridge,kml file comes within only begin and end points of it.(that's Directions Service)
I know this task sounds some lazy,but if there is a way to do this with Google or another service or by implementing some code on given route,we have to try it.
Any ideas ?
I found solution by using GIS desktop tool where points can be added manually.
By saving table as .kml,I achieved to collect gps route.It may not look GPS track alike,but it was to easy to handle the situation.