Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to add this kml-link from Google Maps to an OpenLayers instance.

The following code is not working:

var layer = new OpenLayers.Layer.GML("KML", " vps=2&hl=de&ie=UTF8&msa=0&output=kml&msid=203149634091768565111.0004cf65c9b03cc8ae76c", 
format: OpenLayers.Format.KML,
formatOptions: {
'extractStyles': true

Thanks alot for any ideas!

share|improve this question

You should put the kml on the server and link to the file. Like this:

var layer = new OpenLayers.Layer.GML("KML", "kml/lines.kml", {
   format: OpenLayers.Format.KML
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.