Open all InfoWindows on a Google Map - google-maps

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.

Related

Google Map: How can I select multiple markers, which I imported, by clicking or drawing a shape around them?

I created a map with Google Map Maker. I did so by imported 5 different Excel files that had address fields and saved them all as different layers. The map now has about 500 addresses which are marked with pins that are color coded to the layer they belong with.
Is there anyway I can either use the "Draw Line" tool or another means to select a group of those markers/pins? Ideally I am envisioning being able to draw a shape around them and then being able to select those address to save them as a new data table or layer to export back to Excel.
Does anyone know of a way to achieve this? Even if it is another product then Google Maps? Thank you so much any help would be a life saver.

google maps - best way to show all saved locations on map (saved in my db or directly on maps server?)

I have a page where latitude, longitude can be saved by clicking on the map. Currently storing those values in my db.
I want to build a webpage where I want to show all saved places.
One answer I know is: retrive all records from db, and mark them on map.
This way also helps in filtering based on some fields in db. By the way, how to show radially, I mean, instead of loading all places at once, I think its good to do ajax requests to my db for places(lat, longitudes) available in that radial region showed by map, when we move the map, then we search in our db for places in that radial range and show only those places. this way, we need not load all(may be a million) saved places at a time. But how to do this? How can I fetch all records in my db whose lat, longitutes present in that radial range?
Another way: While saving in db itself, also save on map somehow so when that map is shown it will simply show that map which automatically shows saved places(saved in google maps server somehow).
Is this possible? even if possible, I think I cant filter(easily) based on fields in this way as they are shown directly by map. But, if possible to do, it can be used to show simply when not filtering.

How to filter custom results on google maps?

I'm doing this as an exercise to gain some insight on how such things work in real life.
I have some options on the UI, based on which the results are filtered and they need to be displayed on google maps. Something along the lines of padmapper.com.
Drill down to San Francisco and one can change the budget on UI. As the budget is modified, search results are modified on google maps.
How can I achieve this where I have a simple slider (e.g. budget) and the underlying results are updated as the slider is moved ?
Without code, it's hard to give you an example in code, so I'll try in english:
Basically whatever slider you're using has some sort of change event that's fired after you change the slider values. On this event, capture the values, loop through your Markers on the map, and if some property of your marker falls within the slider's values, show it, otherwise hide it.
This assumes that when you created the Marker you did 2 things: 1) give it some sort of custom property to store the value you want to filter on, and 2) you stored a reference to each Marker in an array.
Would love to help you more, but you'll need to post some code.
Updated to address comment:
To handle the "too much data issue", you can call the server to load just the points that fall within the map's view (called a bounding box) as Markers on the client. On your filter's change event, you loop through these Markers that are already on the client and show or hide them based on the filter, no call to the server necessary, unless the user navigates the map again, then on idle you can make another call to the server and retrieve points again in the bounding box, but that also match your filter criteria. So it's a combination of only retrieving the data you need from the server, and filtering them on the client. You can also have a limit to how many points come back from the server, so you don't lose performance when zoomed out.
For more info on handling lots of data, see this article from Google and this specific implementation.

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.

google maps multiple line segments

this question is kind-of programming related but not exactly - see how we go...
I am trying to view a trip i have made using a gps tracking device onto google maps as one continuous line, however, when i upload the KML file onto google maps it is arbitrarily broken into about 7 different segments.
The trip was made in one go and when shown in google earth it is shown as one continuous line.
I have inspected the KML file and all coordinates are contained within the same single linestring element.
Does anyone know why this is occuring?
Regards
Grant.
It looks like other people have experienced the same problem that you're having, but I was unable to find a solution. It seems that this is just a bug in the Google Maps KML parser.
If you don't mind creating your own map with the Google Maps API, you should be able to parse the file with no problem. There are also some sites like this one which will create a map from your KML file.