Convert google earth to google maps

6,807 views
Skip to first unread message

yossi balan

unread,
May 24, 2012, 9:07:42 AM5/24/12
to kml-support-g...@googlegroups.com
Hi
 
I want to find KML file of border of continent. ( not the country )
I found KML file but it is in format of google earth.
It it possible to convert the file from google earth to google maps ?
Do you have any idea where I can find data of continent in KML of google maps format ?
 
Regards,
Yossi
 

barryhunter (KML Guru)

unread,
May 24, 2012, 10:30:58 AM5/24/12
to KML Developer Support - Getting Started with KML
both accept KML. There is no difference in format.


Maybe you could elaborate on the specific issue you are facing, what
KML does not work in Google Maps?

yossi balan

unread,
May 25, 2012, 2:43:24 AM5/25/12
to KML Developer Support - Getting Started with KML
Hi

I want to get the border of the continent.
I need to color each continent in diffrerent color.
I tried to look on the web this information in KML or fustion data.
I found KML for this but when I load it I didn't see any change in my
application.
I looked on the KML and i sow that the tags releavnt for google earth
and not for google map for example the tag <lookat?
as far as I understood the file is not update.
Could you please advise me how I can find KML file on the border of
the continent ?
Could you send me the file ?

Regards,
Yossi
> > Yossi- Hide quoted text -
>
> - Show quoted text -

barryhunter (KML Guru)

unread,
May 25, 2012, 10:25:13 AM5/25/12
to KML Developer Support - Getting Started with KML
> I found KML for this but when I load it I didn't see any change in my
> application.

You may have more luck if you include a link to your page. Its quite
possible there is some other issue, and its not the KML at fault.


Have you tried loading the kml into Google Maps - ie maps.google.com
paste the url of the file there.


> I looked on the KML and i sow that the tags releavnt for google earth
> and not for google map for example the tag <lookat?

A lookat can be used by Google Maps.

In generla Gmaps will just ignore any tags it doesnt support.

> as far as I understood the file is not update.
> Could you please advise me how I can find KML file on the border of
> the continent ?

Sounds like you already have one.

> Could you send me the file ?

Why do you think I have one?

yossi balan

unread,
May 26, 2012, 5:20:25 AM5/26/12
to KML Developer Support - Getting Started with KML
Hi

Thanks for the help.
this is my application
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Google Maps JavaScript API v3 Example: KmlLayer KML</title>
<link href="/maps/documentation/javascript/examples/default.css"
rel="stylesheet" type="text/css" />
<script type="text/javascript" src="https://maps.googleapis.com/maps/
api/js? sensor=false"></script>
<script type="text/javascript" src="http://geoxml3.googlecode.com/
svn/branches/polys/geoxml3.js"></script>
<style type="text/css">
html { height: 100% }
body { height: 100%; margin: 0; padding: 0 }
#map_canvas { height: 100% }
</style>

<script type="text/javascript">
function initialize() {
var chicago = new google.maps.LatLng(41.875696,-87.624207);
var myOptions = {
zoom: 2,
center: chicago,
mapTypeId: google.maps.MapTypeId.ROADMAP }
var map = new google.maps.Map(document.getElementById("map_canvas"),
myOptions);
var geoXml = new geoXML3.parser({map: map, singleInfoWindow:
true});
geoXml.parse('doc2.kml'); }
</script>
</head>
<body onload="initialize()">
<div id="map_canvas"></div>
</body>
</html>

and this is the KML that I found on the web
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.0">
<Document>
<name>Continents.kmz</name>
<Style id="khStyle646">
<LineStyle id="khLineStyle649">
<antialias>0</antialias>
</LineStyle>
<PolyStyle id="khPolyStyle648">
<fill>0</fill>
<outline>0</outline>
</PolyStyle>
<IconStyle id="khIconStyle650">
<Icon>
<href>root://icons/palette-3.png</href>
<x>160</x>
<y>128</y>
<w>32</w>
<h>32</h>
</Icon>
</IconStyle>
</Style>
<Style id="khStyle653">
<LineStyle id="khLineStyle656">
<antialias>0</antialias>
</LineStyle>
<PolyStyle id="khPolyStyle655">
<fill>0</fill>
<outline>0</outline>
</PolyStyle>
<IconStyle id="khIconStyle657">
<Icon>
<href>root://icons/palette-3.png</href>
<x>96</x>
<y>160</y>
<w>32</w>
<h>32</h>
</Icon>
</IconStyle>
</Style>
<Folder>
<description>All information from www.wikipedia.org</description>
<name>Continents</name>
<Placemark>
<LookAt>
<longitude>69.34975938772639</longitude>
<latitude>-85.51850370658478</latitude>
<range>4660494.527334587</range>
<tilt>1.489515791197339</tilt>
<heading>-94.23630609027376</heading>
</LookAt>
<styleUrl>#khStyle653</styleUrl>
<Point>
<coordinates>80.29122647597791,-85.36965069939549,0</
coordinates>
</Point>
</Placemark>
<Placemark>
<name>North America</name>
<LookAt>
<longitude>-92.38030591736974</longitude>
<latitude>41.60040029662515</latitude>
<range>6572383.886462871</range>
<tilt>1.489515791197389</tilt>
<heading>5.091613582461503</heading>
</LookAt>
<styleUrl>#khStyle653</styleUrl>
<Point>
<coordinates>-98.11233984563178,45.32023029701742,0</
coordinates>
</Point>
</Placemark>
<Placemark>
<name>South America</name>
<LookAt>
<longitude>-62.99013711154147</longitude>
<latitude>-21.48589474193573</latitude>
<range>7218561.25099345</range>
<tilt>1.489515791197348</tilt>
<heading>14.48258802805428</heading>
</LookAt>
<styleUrl>#khStyle653</styleUrl>
<Point>
<coordinates>-58.60850163074399,-15.26868557309036,0</
coordinates>
</Point>
</Placemark>
<Placemark>
<description>The primary use of the term Oceania is to describe
a continental region (like Europe or Africa) that lies between Asia
and the Americas, with Australia as the major land mass. The name
Oceania is used, rather than Australia, because unlike the other
continental groupings, it is the ocean rather than the continent that
links the nations together. Oceania is the smallest continental
grouping in land area and the second smallest, after Antarctica, in
population.</description>
<name>Australasia / Oceania</name>
<LookAt>
<longitude>149.9280610479762</longitude>
<latitude>-19.96203640214011</latitude>
<range>5948094.214726813</range>
<tilt>1.489515791197347</tilt>
<heading>-3.233441994279863</heading>
</LookAt>
<styleUrl>#khStyle653</styleUrl>
<Point>
<coordinates>153.0281098590235,-19.81023956617555,0</
coordinates>
</Point>
</Placemark>
<Placemark>
<name>Europe</name>
<LookAt>
<longitude>13.36662252078061</longitude>
<latitude>47.49923408453745</latitude>
<range>2926553.150350343</range>
<tilt>1.489515791197361</tilt>
<heading>5.315432286214211</heading>
</LookAt>
<styleUrl>#khStyle653</styleUrl>
<Point>
<coordinates>7.703642655915047,48.19165017141015,0</
coordinates>
</Point>
</Placemark>
<Placemark>
<name>Asia</name>
<LookAt>
<longitude>88.44296071080763</longitude>
<latitude>29.02076366275569</latitude>
<range>5948094.214726811</range>
<tilt>1.489515791197341</tilt>
<heading>4.339173834203948</heading>
</LookAt>
<styleUrl>#khStyle653</styleUrl>
<Point>
<coordinates>88.87769612972068,35.90237786706015,0</
coordinates>
</Point>
</Placemark>
<Placemark>
<name>Africa</name>
<LookAt>
<longitude>20.16987332895207</longitude>
<latitude>1.368208952904757</latitude>
<range>8150113.588222869</range>
<tilt>1.489515791197357</tilt>
<heading>-4.536422889821256</heading>
</LookAt>
<styleUrl>#khStyle646</styleUrl>
<Style>
<IconStyle>
<Icon>
<href>root://icons/palette-3.png</href>
<x>96</x>
<y>160</y>
<w>32</w>
<h>32</h>
</Icon>
</IconStyle>
</Style>
<Point>
<coordinates>21.06451559663505,6.103658771972451,0</
coordinates>
</Point>
</Placemark>
</Folder>
</Document>
</kml>

What do you mean lod the KML into google maps ? how i can do it ?
I think my KML is old but I tried to look on the web for sever days
but I didn't find any KML with this information.
I hope that this KML will help me.

Regards,
Yossi

Rossko

unread,
May 26, 2012, 9:46:47 AM5/26/12
to KML Developer Support - Getting Started with KML
> What do you mean lod the KML into google maps ? how i can do it ?

Use your browser to vist maps.google.com
Paste a public URL to your KML file into the 'search' box
If your KML is only available locally, that won't work.
Where did you find your KML, presumably that was at a public URL that
you can try?

> and this is the KML that I found on the web
> ...
> <name>Continents.kmz</name>

Is your file KML or KMZ? I don't think GeoXML3 works with KMZ

yossi balan

unread,
May 26, 2012, 3:30:55 PM5/26/12
to KML Developer Support - Getting Started with KML
Hi

The KML is working locally.
I don't remember where I found it.
I tried to look for several days for KML with information on the
Continents.
I success to loaf KML file with GeoXML3.
Could you please send me the link of the Continents.kmz that you found
on the web?
Do you have any idea why the KML that I found is not working?

Regards,
Yossi

Rossko

unread,
May 27, 2012, 9:56:21 AM5/27/12
to KML Developer Support - Getting Started with KML
> I don't remember where I found it.

That'll make it difficult for you to give the author credit

> I success to loaf KML file with GeoXML3.

Do you mean you can use GeoXML3 okay with other KML files, or with
this continent file?


> Could you please send me the link of the Continents.kmz that you found
> on the web?

I didn't say I found any on the web.
I noted that the file you pasted here contains the line
<name>Continents.kmz</name>
which suggests it was a KMZ file at some time. I asked whether your
copy was KML or KMZ and I'm still not sure.

If you want to search for continents.kmz its easy
http://www.google.com/search?q=continents.kmz

> Do you have any idea why the KML that I found is not working?

Do you have the images that your KML refers to, such as
<href>root://icons/palette-3.png</href>



>
> Regards,
> Yossi
> On May 26, 4:46 pm, Rossko wrote:
>
>
>
> > > What do you mean lod the KML into google maps ? how i can do it ?
>
> > Use your browser to vist maps.google.com
> > Paste a public URL to your KML file into the 'search' box
> > If your KML is only available locally, that won't work.
> > Where did you find your KML, presumably that was at a public URL that
> > you can try?
>
> > >  and this is the KML that I found on the web
> > >    ...
> > >    <name>Continents.kmz</name>
>
> > Is your file KML or KMZ?  I don't think GeoXML3 works with KMZ- Hide quoted text -

yossi balan

unread,
May 28, 2012, 2:52:18 AM5/28/12
to KML Developer Support - Getting Started with KML
I sucess to load with geoXML3 for other files but not to this one with
the continent data
The file was KMZ file.

Rossko

unread,
May 28, 2012, 2:56:31 PM5/28/12
to KML Developer Support - Getting Started with KML
> The file was KMZ file.

duka89

unread,
May 28, 2012, 5:25:08 PM5/28/12
to kml-support-g...@googlegroups.com
Hi,
I have a problem with publishing kml file. My kml files can not be seen on the picture. I would like to, if not a problem to see my html file, and to say what went wrong. 

<html>
<head>
<script src="http://openlayers.org/api/OpenLayers.js" type="text/javascript"></script>
</head>
<body>
<div id="map" class="smallmap"></div>
<script defer="defer" type="text/javascript">
var map = new OpenLayers.Map('map');

var wms = new OpenLayers.Layer.WMS("WMS", "http://vmap0.tiles.osgeo.org/wms/vmap0",
            {layers: "basic"}
        );

var kml1 = new OpenLayers.Layer.Vector("point", {
            strategies: [new OpenLayers.Strategy.Fixed()],
            protocol: new OpenLayers.Protocol.HTTP({
                format: new OpenLayers.Format.KML({
                    extractStyles: true, 
                    extractAttributes: true,
                    maxDepth: 2
                })
            })
        });

var kml2 = new OpenLayers.Layer.Vector("line", {
            strategies: [new OpenLayers.Strategy.Fixed()],
            protocol: new OpenLayers.Protocol.HTTP({
                format: new OpenLayers.Format.KML({
                    extractStyles: true, 
                    extractAttributes: true,
                    maxDepth: 2
                })
            })
        });
var kml3 = new OpenLayers.Layer.Vector("polyline", {
            strategies: [new OpenLayers.Strategy.Fixed()],
            protocol: new OpenLayers.Protocol.HTTP({
                format: new OpenLayers.Format.KML({
                    extractStyles: true, 
                    extractAttributes: true,
                    maxDepth: 2
                })
            })
        });



map.addControl(new OpenLayers.Control.LayerSwitcher());
map.addLayers([kml1, kml2, kml3, wms]);
 
map.zoomToMaxExtent();
</script>
</body>
</html>

Rossko

unread,
May 30, 2012, 4:53:53 PM5/30/12
to KML Developer Support - Getting Started with KML
> I have a problem with publishing kml file.

Doesn't seem to have anything to do with continents?

> My kml files can not be seen on the picture.

It's been explained already how you can do a simple test of public KML
files using maps.google.com
Your three seem to work fine there.

> <script src="http://openlayers.org/api/OpenLayers.js"

This is not a group for OpenLayers support.
Try http://osgeo-org.1560.n6.nabble.com/OpenLayers-Users-f3910695.html

At a guess, you may need to look into cross-domain issues.
Reply all
Reply to author
Forward
0 new messages