I've mapped a number of addresses with various fields of data in my table. How can I show a field for which I have data for one address but make sure it does not show in the info window for the addresses that have no such data?
For example, some of my addresses are properties that have been demolished. My table includes that info and the cost of the demolition. Is there something I can write in the code to make the "Cost of demolition" field show in the windows for the addresses that have a value for that field, and not show in those that do not?
My apologies for such a basic question. I'm a journalist just learning his way around this stuff. I found one other question about displaying photos that seemed somewhat related but I wasn't sure that answered my question.
Thanks for the help.
The only way to do this using a little programming using the Fusion Tables Layer in the Google Maps API. It is not possible using the Fusion Tables UI alone. An example of how to change info window content based on data in the table is available here:
https://developers.google.com/fusiontables/docs/samples/change_infowindow_content
Related
I'm trying to create a table with editable cells in a google form that lets people enter their response. It would have multiple fixed columns and dynamically adding rows for more response.
Sample image of the desired table in google form for response
I am naive about building google forms and running scripts/codes on forms. A detailed explanation of steps will be of good help.
Thanking in advance to wonderful people who do such fabulous work
At the moment it is not possible to insert tables in Google Forms, not even via Apps Script, but since you are interested in learning about Forms and Scripts I would recommend you start with this quickstart about managing Form responses.
If you explain perhaps with more detail what your goal by inserting the table is, maybe there is a way with the available options in forms to achieve it.
I am trying to create a sidebar to go along with the google map visualization I've created with fusion tables. I found this page fusion table with sidebar with an updated SQL query statement. I've tried implementing a similar statement and I am unable to view the map. What am I doing wrong? Here is my code with the SQL statement:
https://gist.github.com/anonymous/0a9214027de977e40ed04b9db17cc7f7
I don't have the expertise or time to correct all the JavaScript at moment, but I can see a few issues I noticed that could be causing you issues.
You don't have an API call included in the query, which
can be found/created at
https://console.cloud.google.com/apis/library.
You're not querying the correct column for your location (col4, not col2). It starts at 0; so col0, col1, ...
You need to create a map and then load the Fusion Table layer over it.
There's possibly a few more issues I didn't immediately see. An alternative to trying to fix this custom code is to use the "Searchable Map Template" by Derek Elder. It uses Bootstrap for CSS, you plug in your API key, Google Fusion Tables ID, and the location column. It allows for filters to be input, like your Genre drop-down menu. It's free, fairly well documented, and has a support group to help with any questions or issues.
Maybe that's what you need if you just want a quicker fix. I realize I didn't exactly answer your question, but if you could upvote the answer if it was a least somewhat useful, I'd appreciate it.
I'm kind of new at web dev and had a question of getting data from wikipedia. I am making a personal web app that will keep track of past UFC events. I couldn't find an open source api with event details and results. However the following table on wikipedia has a lot of the info I need: http://en.wikipedia.org/wiki/List_of_UFC_events
And I have seen several tutorials on how to get the info from a wiki table and format it into .csv format using google spreadsheets, or other software such as openrefine. But, I also want the information from each event's wikipage(fight results, winners, award winners, poster images etc.), and each event's own wiki page is lined on the table I mentioned above. I was wondering, what is the easiest way to go about extracting this information?
You can use nokogiri gem to scrap the web page
So I've got a couple of different fusiontable visualizations in a google site:
https://sites.google.com/site/hlsbeta123123123123/
I am wondering if there is a way to link them so that when a pin in the map is selected the corresponding card is shown in the other iframe?
What I'd really like to be able to do is offer people a search over the fusion table via the google site, so that when somebody searched in the site search, they'd get back a list of hits in the map and cards, and have them all linked up together ... Any simple way to do this over paired visualizations or would this have to be custom site built on the fusiontables API?
I know fusion tables wizard:
http://fusion-tables-api-samples.googlecode.com/svn/trunk/FusionTablesLayerWizard/src/index.html
can provide something like this for a single visualization, but am unclear about linking multiple visualizations - maybe that's just completely impractical ...
Many thanks in advance
Cheers> SAM
p.s. Here's a current screenshot in case it the site changes :-)
It's possible, but instead of the iframe-map you must create the map on your own to be able to modify the default behaviour(opening of the infoWindow on click and load the filtered card instead).
It's not much difficult, the most of the src you will get with map->publish->get HTML and javascript
All you have to do is:
supress the infoWindows(set the suppressInfoWindows-option of the layer to true)
observe the click-event of the layer and load the card based on a unique col(Charity Number appears to be unique)
google.maps.event.addListener(layerl0, 'click',function(e){
document.getElementById('cards')//iframe-element
.src='https://www.google.com/fusiontables/embedviz?viz=CARD&q=select+*+from+1ZnLJPfdXgiD49s3JO9Vyhf0VPGgBnzs-985jT3s+where+col1+%3D+'+e.row['Charity Number'].value+'&tmplt=4&cpr=1';
});
Demo: http://jsfiddle.net/doktormolle/YVnus/
But actually showing the cards in an iframe forces a redundant request, instead you may fetch the contents of the infoWindow and insert them directly into the page.
Currently we're having a request to integrate the Google Form functionality into our system. I'd done some searching on the web, and found that there's no way we can change the post processing of a Google Form unless we do some heavy customization using 3rd party tools.
Thus i have an idea that, when someone fill in the Google Form, he/she will need to fill in a 'user id' in the form. This will be collected as a field in the Google Spreadsheet generated by the form.
In my back end application, i would query the spreadsheet and look for the user id field input by the user. Then i would be able to know whether he/she completed the form or not.
I'm trying to look at the Google Docs API for the spreadsheet and found that there are list-based feed and cell-based feed but i'm not sure which one can achieve what i want to do. Anyone has experience in this can shed a light?
Thank you
Think of a list based feed as being like SQL. You can read rows, insert rows(at the bottom), delete rows and update rows. - you can only store data, not formulas. In contrast, A CELL based feed lets you read and write to cells, any cell, using the cell reference (R1C1 style). CELL FEED give you more control, and includes batch updates.
some sample CELL FEED code is here:
http://code.google.com/p/gdata-java-client/source/browse/trunk/java/sample/spreadsheet/cell/CellDemo.java?r=51
Another option is too use google apps script, this is maybe less work if you just want to extract data. The html service is probably the tool for the job https://developers.google.com/apps-script/html_service - as you can dont need OAuth to do the read.