How to represent a table using excel data when clicked on a location in Google Earth Pro? - kml

I am building a map on Google Earth Pro to visualize political workers' data in a specific area. I have designed the basic elements in kml but the data used is hard coded in the kml file itself. I want to automate the process so that anyone can change the data in the master excel sheet and it gets reflected on Google Earth because the booth workers keep changing in every area for every election.
How can I fetch data from an excel sheet and represent it in a tabular format on Google Earth?
Sharing a snippet from the kml file:
`<Placemark>
<name>1,Dehradun</name>
<description><[CDATA[<div><b>PARTY WORKERS</b><br></div>
<table border="1">
<tbody>
<tr><br></tr><tr><td><b>SNO</b><br></td><td><b>NAME</b><br></td><td><b>CONTACT</b><br></td><td><b>COMMENTS</b><br></td><td><b>WORK ASSIGNED</b><br></td></tr>
<tr><td>1<br></td><td>Member1<br></td><td>9917973599<br></td><td>GOOD WORKER<br></td><td>BOOTH MGMT<br></td></tr>
<tr><td>2<br></td><td>Member2<br></td><td>8958644329<br></td><td>LAZY<br></td><td>MAKE PHONE CALLS<br></td></tr>
<tr><td>3<br></td><td>Member3<br></td><td>7894512547<br></td><td>SMART<br></td><td>DATA MGMT<br></td></tr>
</tbody>
</table>
<div><br></div><div><br></div><div><b>INFLUENCERS</b><br></div>
<table border="1">
<tbody>
<tr><br></tr><tr><td><b>SNO</b><br></td><td><b>NAME</b><br></td><td><b>CONTACT</b><br></td><td><b>COMMENTS</b><br></td><td><b>WORK ASSIGNED</b><br></td></tr>
<tr><td>1<br></td><td>Influencer1<br></td><td>9917973599<br></td><td>HIGH INFLUENCE<br></td><td>BOOTH MGMT<br></td></tr>
<tr><td>2<br></td><td>Influencer2<br></td><td>8958644329<br></td><td>ENTIRE BOOTH<br></td><td>NO WORK ASSIGNED<br></td></tr>
<tr><td>3<br></td><td>Influencer3<br></td><td>7894512547<br></td><td>SMART MAN<br></td><td>DATA MGMT<br></td></tr>
</tbody>
</table></description>
<styleUrl>#__managed_style_053287BE6F14D9C2C7B8</styleUrl>
<Point>
<coordinates>78.032188,30.316496,0</coordinates>
</Point>
</Placemark>`
Tried Spreadsheet Mapper V3.2 earlier but it doesn't seem to work now. Found out online that it has been discontinued.
I want this kind of output but it should come from an excel sheet instead of being hard coded:
enter image description here

In order to update a KML file from a spreadsheet, you'll need a server of some kind that can re-generate the KML when the spreadsheet is updated (like Spreadsheet Mapper used to do using Apps Scripts). This is not something that is "built in" to Google Earth, so there's not a simple solution.
That said, Google My Maps recently launched a feature where you can update a layer in your MyMap based on changing data in a spreadsheet. For info see this medium post:
https://medium.com/google-earth/new-my-maps-features-make-it-easier-to-share-maps-update-datasets-and-more-965ed0b48875
and this documentation page:
https://support.google.com/mymaps/answer/3024836
I'm not if it will be easy or even possible to update the data behind your custom balloon layout, but it's probably worth a shot. If you get it to work, then you can either have your users view the data directly in My Maps, or you can try getting the NetworkLink KML for the MyMap, and viewing that in Earth.

Related

Default Sitelogo (image) for googlebot?

Hy
How i can add a default image for my site to display in the google search results when i type the name of the site to search for?
Currently every few weeks a different image/picture is displaying, current one picture from my news.
Google Search result =
https://www.may_site.com [ logo ]
Currently I added a logo to my first link at the top of the page..
<img src="/images/logo.png" width="70" height="70" alt="Sitename Logo">
Sometimes no picture is visible :/
Google reads meta tags in your page <head></head> to understand what you want to show in search results.
As far as I know there is not an official "logo" or "image" tag that Google support, but is smart enough to understand that "og:image" is the page image.
<head>
<meta name="og:image" content="http://ia.media-imdb.com/rock.jpg">
</head>
You can read more here: https://developers.google.com/search/docs/advanced/crawling/special-tags
And you can find a comprehensive list of meta here
https://gist.github.com/lancejpollard/1978404
Google supports defining your logo in structured data. Here is their documentation on it:
https://developers.google.com/search/docs/advanced/structured-data/logo
However, I think you are talking more about a general image related to a page.
Using the og:image meta tag mentioned by #supermod can be a hint. Google also understands images in certain structured data types like recipes, products, articles etc. Their gallery shows what structured data can cause rich snippets like an image:
https://developers.google.com/search/docs/advanced/structured-data/search-gallery
But it is not necessary to provide metadata or structured data to get images in the search results. Sometimes Google just picks one from the page.

Using a KML file to display thumbnail & full size pictures in My Maps

I'm afraid my original post was not very clear, so I've rewritten my question.
My basic question is how to modify a KML file to best display (in Google My Maps) two or more photos taken at a particular location. No matter what I do to the KML file (see below), when I click on a marker I always end up with only the first picture being displayed TWICE as shown in this example:
Result of clicking on a place marker with 2 pictures
Below is a snippet of my KML code. Please note that <img src... points to the full-sized version of the picture.
# Marker(s) [1, 2]
<Placemark>
<name>Markers 1,2</name>
<styleUrl>#Pic2</styleUrl>
<description>
<![CDATA[
<table>
<tr>
<td>[1] This Monarch butterfly found Bob H. at the beginning of the hike and stayed around quite awhile!</td>
<img src="https://drive.google.com/uc?export=open&id=16a_438A1OCihb1SnYUPm0t9O3WDEdt6u">
</tr>
<tr>
<td>[2] Denny L. along with Sarah (and "Cooper") also seem ready to start.</td>
<img src="https://drive.google.com/uc?export=open&id=1KMGYeJDgqBDJwgkwYju6vlA8--XehACQ">
</tr>
</table>
]]>
</description>
<Point>
<coordinates>-82.7915648,35.2841368</coordinates>
</Point>
</Placemark>
If I click on EITHER of the pictures in the example I get the full-sized version of that picture. Then, using the ">" and "<" that are displayed next to that full-sized picture I can move to the other pictures taken at that location. This isn't TERRIBLE, but I'd really like to initially see thumbnails of all the pictures taken at a particular location. Clicking on a thumbnail should then bring up the full-sized version. (Also, I don't really want 2 copies of the first picture!)
No matter what I do - including adding an line pointing to the thumbnail - I get exactly the same result when clicking on a marker.
I'm not sure if it is possible to do what I'd like, but any suggestions/thoughts would be greatly appreciated!
Wayne

How to click on an anchor element using VBA in a webform

Can you give me here some code by which I can click on anchor label on a webpage. I want click on the "Configuration"label. These labels are used to navigate from one page to another page. Here is some part of the Web page view source.
<td class="tabtext-unsel"><nobr>Catalogs</nobr></td>
<td class="tabtext-sel"><nobr>Configuration</nobr></td>
After some discussion in comments i can suggest another answer:
Automation and Scripting Language
You may use this to navigate complicated pages, automate work in any application etc. It can copy almost any data and paste it to excel for example.
Maybe this will help you:
Youtube: MrExcel's Learn Excel #665 - Scraping Webpages
There is a technique called web scraping.
You may find many tutorials about web scraping, there are some tutorials for excel.

How can I download to Excel?

I'd like to go about offering a "download to excel" functionality for several different sets of data available on different parts of my coldfusion website. I'm using coldfusion and would love to use freely available custom tags / libraries that can help me accomplish this instead of coding it all myself from scratch. I've been pointed to cflib.org but am not sure how to get started. Anyone have any ideas, comments, or resources about downloading coldfusion website data to excel?
An approach that I have used in the past for an intranet with a load of tabular statistical data is to take advantage of the fact that Excel can read HTML.
On pages that I intend to provide Excel links for, I write out the core table as HTML to a file and include a link to that file in the rendered page. You can then serve this page with an .xls extension, use meta headers or even use an intermediary page with CFCONTENT in order to have your browser fire up Excel to display the content.
This approach can be extended for an arbitrary number of tables per page. You would have to write a tag to contain the table which will then take care of writing the file and supplying the download link for all HTML content contained within.
Sorry for the lack of example code. If my description of the process has left you scratching your head then I'll provide some examples for you.
You can also use an html table, as in:
<cfquery name="data" datasource="whatever">
...
</cfquery>
<cfheader name="Content-Disposition" value="inline; filename=fileName.xls">
<cfcontent type="application/x-msexcel" reset="true">
<table border="0" cellspacing="0" cellpadding="0">
<thead>
<tr>
<td>Col1</td>
<td>Col2</td>
</tr>
</thead>
<tbody>
<cfoutput query="data">
<tr>
<td>#data.Col1#</td>
<td>#data.Col2#</td>
</tr>
</cfoutput>
</tbody>
</table>
hth,
larry
If you are on ColdFusion 9, you can always use cfspreadsheet:
http://www.cfquickdocs.com/cf9/#cfspreadsheet
http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WS434C35B0-279B-4051-A61B-D84B5D76189C.html
Building on #Ciaran Archer's answer, I usually use CSV to accomplish this, which Excel will open up from the web if installed on a client's PC. Assuming the data you're working with is coming out of a database, use the QueryToCSV() from Ben Nadel's site as such:
<cfquery name="data" datasource="">
...
</cfquery>
<cfinclude template="fun_queryToCSV.cfm">
<cfheader name="Content-Disposition" value="filename=my-file-name.xls">
<cfcontent type="test/csv" reset="true">
<cfoutput>#querytoCSV(data)#</cfoutput>
The "reset" on cfcontent clears the response buffer so that the only thing inside of it is what comes after. Alternately, if you already have the data as file, cfcontent has a "file" attribute that will serve its contents up directly.
In the end, we used the Query2Excel function from cflib.org, and modified it slightly to suit our specific needs.
For those on Coldfusion 9+ and able to use cfspreadsheet, you can leverage SpreadsheetReadBinary() to make the spreadsheet downloadable without having to write the spreadsheet to a file first.

Creating tooltips for each field in Sharepoint form

I want to create tool tips for each part in a form which employees have to fill in a share point web page. When users move the mouse cursor on each field (Title, description, department etc.) the related tip will be automatically became visible as a simple pop-up (tool tip) and summarize what they should write there. and when the mouse cursor is not on one of these fields there is no tool tip.
How can I design such a system via share point designer? I am not able use any add ons. I can't upload any additional things to the server. I have to make page based design.
I would be glad if you kindly help me.
Have you considered using field description?
This is SharePoint's default way of adding additional information to fields.
I couldn't find the ToolTip control in my SharePoint Designer 2007 Toolbox, so I looked on W3Schools.com for a standard HTML option and found that you can use the <ABBR> tag.
See http://www.w3schools.com/tags/tag_abbr.asp for the reference, but here's an example of a tooltip implemented on a SharePoint field title in a display form:
<td valign="top" class="ms-formlabel" style="width: 50px">
<H3 class="ms-standardheader">
<nobr><abbr title="The actual number of man-days effort expended.">Man-days (Actual)</abbr></nobr>
</H3>
</td>
Open up the aspx page for the form in SharePoint designer. Then you can use SharePoint designer just like Visual Studio to see the code. Try adding the "tooltip" attribute to the field controls within the form. There is a small possibility these controls will actually be written using XSLT instead of ASP, so be prepared to do some studying.
By default the display name of the site column becomes the tool tip for that field.

Resources