Mobile app version of vmapp.org
Login or Join
BetL925

: What is the best practice with KML files when adding geositemap? I'm not sure how to deal with KML files. Now important particularly in reference to the Google Venice update. My site basically

@BetL925

Posted in: #Geolocation #XmlSitemap

I'm not sure how to deal with KML files. Now important particularly in reference to the Google Venice update. My site basically is a guide of many company listings (sort of Yellow Pages). I want each company listing to have a geolocation associated with it.

Which of the options I present below is the way to go?

OPTION 1: all locations in a single KML file with a reference to that KML file from a geositemap.xml

MYGEOSITEMAP.xml

<?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.mysite.com/locations.kml</loc> <geo:geo> <geo:format>kml</geo:format></geo:geo></url>
</urlset>


ALLLOCATIONS.kml

<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">
<Document>
<name>MyCompany</name>
<atom:author>
<atom:name>MyCompany</atom:name>
</atom:author>
<atom:link href="http://www.mysite.com/locations/3454/MyCompany" rel="related" />
<Placemark>
<name>MyCompany, Kalverstraat 26 Amsterdam 1000AG</name>
<description><![CDATA[<address><a href="http://www.mysite.com/locations/3454/MyCompany">MyCompany</a><br />Address: Kalverstraat 26, Amsterdam 1000AG <br />Phone: 0646598787</address><p>hello there, I'm MyCompany</p>]]>
</description><Point><coordinates>5.420686499999965,51.6298808,0</coordinates>
</Point>
</Placemark>
</Document>
</kml>

<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">
<Document>
<name>MyCompany</name><atom:author><atom:name>MyCompany</atom:name></atom:author><atom:link href="http://www.mysite.com/locations/22/companyX" rel="related" /><Placemark><name>MyCompany, Rosestreet 45 Amsterdam 1001XF </name><description><![CDATA[<address><a href="http://www.mysite.com/locations/22/companyX">companyX</a><br />Address: Rosestreet 45, Amsterdam 1001XF <br />Phone: 0642195493</address><p>some text about companyX</p>]]></description><Point><coordinates>5.520686499889632,51.6197705,0</coordinates></Point></Placemark>
</Document>
</kml>


OPTION 2: a separate KML file for each location and a reference to each KML file from a geositemap.xml (kml files placed in a kmlfiles folder)

MYGEOSITEMAP.xml

<?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.mysite.com/kmlfiles/3454_MyCompany.kml</loc> <geo:geo>
<geo:format>kml</geo:format></geo:geo></url>
<url><loc>http://www.mysite.com/kmlfiles/22_companyX.kml</loc> <geo:geo>
<geo:format>kml</geo:format></geo:geo></url>
</urlset>


*3454_MyCompany.kml*

<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">
<Document><name>MyCompany</name><atom:author><atom:name>MyCompany</atom:name></atom:author><atom:link href="http://www.mysite.com/locations/3454/MyCompany" rel="related" /><Placemark><name>MyCompany, Kalverstraat 26 Amsterdam 1000AG</name><description><![CDATA[<address><a href="http://www.mysite.com/locations/3454/MyCompany">MyCompany</a><br />Address: Kalverstraat 26, Amsterdam 1000AG <br />Phone: 0646598787</address><p>hello there, I'm MyCompany</p>]]></description><Point><coordinates>5.420686499999965,51.6298808,0</coordinates></Point></Placemark>
</Document>
</kml>


*22_companyX.kml*

<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">
<Document><name>companyX</name><atom:author><atom:name>companyX</atom:name></atom:author><atom:link href="http://www.mysite.com/locations/22/companyX" rel="related" /><Placemark><name>companyX, Rosestreet 45 Amsterdam 1001XF </name><description><![CDATA[<address><a href="http://www.mysite.com/locations/22/companyX">companyX</a><br />Address: Rosestreet 45, Amsterdam 1001XF <br />Phone: 0642195493</address><p>some text about companyX</p>]]></description><Point><coordinates>5.520686499889632,51.6197705,0</coordinates></Point></Placemark>
</Document>
</kml>


OPTION 3?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @BetL925

1 Comments

Sorted by latest first Latest Oldest Best

 

@Angela700

If you can create an index file similar to sitemap index files I would use that method (Option 1) this way you don't end up with thousands of individual files.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme