[Qgis-user] How can I exporting KML for Google Maps

Alex Mandel tech_dev at wildintellect.com
Fri Nov 12 14:11:05 PST 2010


Have you considered making a simple OpenLayers webpage with Google Maps
as the basemap you can easily overlay the kml on top of it.

It's unlikely that anything is wrong with your kml and you're just
hitting limitations of the Google web tools.

Enjoy,
Alex

On 11/12/2010 01:39 PM, Aaron Kreider wrote:
> I'm working on exporting US counties into a kml file so that I can use
> it on Google Maps (ver 2).
> 
> Google Maps has a limit of 10mb for kml files.
> 
> I get a shapefile from the US Census Bureau (100mb).  I use the
> "simplify geometries" feature to get it down to under 10mb.  Then I
> "save as" kml.
> 
> Now I've got a kml that looks fine in Google Earth, QuantumGIS (1.5),
> and ArcGis.  However it doesn't display in Google Maps (I see nothing
> and there are no errors).   What is my problem?
> 
> 
> You can see my kml: http://www.energyjustice.net/map/kml/counties01.kml
> <http://www.google.com/url?sa=D&q=http://www.energyjustice.net/map/kml/counties01.kml&usg=AFQjCNFfXnlYA01s1cdgKQ11XDuvHa5ZAw>
> 
> 
> You can see my html test page: http://www.energyjustice.net/map/ri.html
> <http://www.google.com/url?sa=D&q=http://www.energyjustice.net/map/ri.html&usg=AFQjCNHq3AIJGiLbJGYbIR3WoFHn0j_OFg>
> 
> 
> 
> Here is my sample kml format:
> ?xml version="1.0" encoding="utf-8" ?>
> <kml xmlns="http://www.opengis.net/kml/2.2
> <http://www.google.com/url?sa=D&q=http://www.opengis.net/kml/2.2&usg=AFQjCNEwHFB9hZtWgJkNVAn37y41v7YyFA>">
> 
> <Document><Folder><name>counties01b</name>
> <Schema name="counties01b" id="counties01b">
> <SimpleField name="Name" type="string"></SimpleField>
> <SimpleField name="Description" type="string"></SimpleField>
> <SimpleField name="STATEFP00" type="string"></SimpleField>
> <SimpleField name="COUNTYFP00" type="string"></SimpleField>
> <SimpleField name="CNTYIDFP00" type="string"></SimpleField>
> <SimpleField name="NAME00" type="string"></SimpleField>
> <SimpleField name="NAMELSAD00" type="string"></SimpleField>
> <SimpleField name="LSAD00" type="string"></SimpleField>
> <SimpleField name="CLASSFP00" type="string"></SimpleField>
> <SimpleField name="MTFCC00" type="string"></SimpleField>
> <SimpleField name="UR00" type="string"></SimpleField>
> <SimpleField name="FUNCSTAT00" type="string"></SimpleField>
> </Schema>
> <Placemark>
> <name>19</name>
> <description>175</description>
> <Style><LineStyle><color>ff0000ff</color></LineStyle>
> <PolyStyle><fill>0</fill></PolyStyle></Style>
> <ExtendedData><SchemaData schemaUrl="#counties01b">
> <SimpleData name="Name">19</SimpleData>
> <SimpleData name="Description">175</SimpleData>
> <SimpleData name="STATEFP00">19175</SimpleData>
> <SimpleData name="COUNTYFP00">Union</SimpleData>
> <SimpleData name="CNTYIDFP00">Union County</SimpleData>
> <SimpleData name="NAME00">06</SimpleData>
> <SimpleData name="NAMELSAD00">H1</SimpleData>
> <SimpleData name="LSAD00">G4020</SimpleData>
> <SimpleData name="CLASSFP00">M</SimpleData>
> <SimpleData name="MTFCC00">A</SimpleData>
> </SchemaData></ExtendedData>
> 
> <Polygon><outerBoundaryIs><LinearRing><coordinates>-94.470506,40.975042999999999,0
> 
> -94.470602999999997,41.157565999999996,0
> -94.014188999999988,41.156762,0 -94.014803,40.897030999999998,0
> -94.470778999999993,40.899501999999998,0
> -94.470506,40.975042999999999,0</coordinates></LinearRing></
> outerBoundaryIs></Polygon>
> </Placemark>
> </Folder></Document></kml>
> 
> 
> 
> 
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user




More information about the Qgis-user mailing list