Submit Your Geo Content to Google
Once you've created KML content for display in Google Earth, Google Maps, or Google Maps for mobile, you'll also want to be sure users can find your KML files using Google Search. Similarly, if you've authored a GeoRSS feed, you'll want to take advantage of Google searches to drive traffic to your content.For example, if you search for "sightseeing near Cairo, Egypt," Google Earth returns the following KML search results in the List view:
This section describes how to create a standard XML Sitemap that notifies Google to crawl your geo content.
The basic steps for publishing your geo content are as follows:
- Create the KML or GeoRSS content. Be sure to add attribution tags, which will appear in the Google Search results for your content.
- Post your files on a public web server.
- Create the Geo Sitemap file. Copy this file to the root directory of your website.
- Submit your Geo Sitemap to Google.
Note: You can also create a standard
robots.txt
file to instruct Google not to index specific pages on your website.Step 1: Create the content and include attribution tags.
KML 2.2 supports new elements for including attribution data in your KML file. The elements used in KML are as follows:atom:author
element - parent element foratom:name
atom:name
element - the name of the authoratom:link
element - contains thehref
attributehref
attribute - URL of the web page containing the KML/KMZ file
http://www.w3.org/2005/Atom
. Your KML file (and GeoRSS feed) must reference the Atom namespace, as shown in the examples that follow. Here is an example of a KML file with information about the author and the website that contains the KML file:
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom"> <Document> <name>One Reader's View of Harry Potter</name> <atom:author> <atom:name>J. K. Rowling</atom:name> </atom:author> <atom:link href="http://www.harrypotter.com" /> <Placemark> <name>Hogwarts</name> <Point> <coordinates>-3.576327,50.620920</coordinates> </Point> </Placemark> <Placemark> <name>Little Hangleton</name> <Point> <coordinates>-0.006660,52.409369</coordinates> </Point> </Placemark> </Document> </kml>Here are a few other tips for creating KML content that provides useful search results:
- Give your <Document> a meaningful <name>.
- Provide a relevant <description> for each <Placemark> so that the user can see the context of the search result.
- If you have a lot of data, divide it into topic-specific layers.
- Give each <Feature> an "id" so that the search result can link directly to it.
http://georss.org/atom
.) This example shows use of <link>
, href
, <author>
, and <name>
, which are all used by Google Search for RSS feeds with geolocated data. <?xml version="1.0" encoding="UTF-8"?> <feed xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns="http://www.w3.org/2005/Atom"> <title>Best Breakfasts in NYC Feed</title> <link href="http://foodCritic.com/feeds/notes_for" rel="self"/> <id>http://foodCritic.com/notes_for</id> <updated>2007-03-09T09:14:02Z</updated> <generator uri="http://foodCritic.com">TheFoodCritic</generator> <entry> <title>the original Big Stacks, best pancakes this side of the Mississippi</title> <author> <name>arnold</name> </author> <georss:point>40.776371 -73.978439</georss:point> <published>2007-03-08T14:19:47Z</published> <content type="html"> . . . </content> </entry> </feed>
Step 2: Post your content on a public web server.
Post your KML files or GeoRSS feed on a public web server. For KML/KMZ, be sure your server is set to return KML/KMZ MIME types, as described in KML Samples.Step 3: Create the Geo Sitemap file.
The Geo Sitemap file (for example,sitemap.xml
) follows the standard Sitemap format described in http://www.sitemaps.org/protocol.html
, with geo-specific elements defined by Google shown in the example below. The geo elements must be in their own unique sitemap file. This Geo Sitemap contains a set of pointers to URLs containing the geolocated data (KML files, KMZ archives, and GeoRSS feeds) for Google to index. Google will crawl your KML files, KMZ archives, and GeoRSS feeds and display information about them to users when they search for information about a certain location or topic. See the Webmaster Tools for more information on creating and submitting Geo Sitemaps.Use the <geo:geo> element to specify that the URL is a geo-related file. Within that element, use the <geo:format> element to specify the type of file, which can be
kml
for KML files, kmz
for KMZ archives, or georss
for RSS with GeoRSS extensions. Here is an example of a sitemap.xml
file: <?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:geo="http://www.google.com/geo/schemas/sitemap/1.0"> <url> <loc>http://www.example.com/example1.kml</loc> <geo:geo> <geo:format>kml</geo:format> </geo:geo> </url> <url> <loc>http://www.example.com/example2.kml</loc> <geo:geo> <geo:format>kml</geo:format> </geo:geo> </url> <url> <loc>http://www.example.com/feeds/example3.xml</loc> <geo:geo> <geo:format>georss</geo:format> </geo:geo> </url> </urlset>You can include multiple
<url>
tags in the Sitemap file, up to a maximum of 50,000 tags, with a maximum file size of 10 MB for the sitemap.xml
file . If you have more than 50,000 URLs, you can create multiple Sitemap files. (See the Sitemap Protocol for more details, as well as this article.)Once you have created the Sitemap file, copy it to the root directory of your website.
Step 4: Submit your Geo Sitemap to Google.
The last step is to add your Geo Sitemap using Google Webmaster Tools and your Google Account.Now users can easily find their way to your geo presentations and articles. For more information on Sitemaps, check out the Webmaster Tools on Creating and Submitting Sitemaps.
Source : Google Code
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.