Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

The following KML file contains paths with style and name tags: example.

<Folder>
          <name>Pedestrian</name>
          <Style id="style-Pedestrian">
            <LineStyle>
              <color>#ff808080</color>
              <width>3</width>
            </LineStyle>
          </Style>
          <Placemark id="">
            <styleUrl>#style-Pedestrian</styleUrl>
            <LineString>
              <altitudeMode>relativeToGround</altitudeMode>
              <coordinates>8.5950278,46.6329618,1 8.5951371,46.6329856,1 8.595266,46.6327811,1 8.5951712,46.6327501,1 8.5950278,46.6329618,1</coordinates>
            </LineString>
          </Placemark>
....

I tried to refer to the styles, but the TileMill does not recognize it. After I import the files and apply the style using "Carto styling language" the path just disappears.

Example:

#imported_id {
  [Name="Pedestrian"] {
    line-width:2;
    line-color:#000000;
  }
}

#imported_id {
  [Name="style-Pedestrian"] {
    line-width:2;
    line-color:#000000;
  }
}

#imported_id  #style-Pedestrian {   
      line-width:2;
      line-color:#000000;

  }

Why I can't refer to the styles inside the TileMill? Is it possible or I am doing something wrong?

share|improve this question
add comment

1 Answer

Please check out http://www.mapbox.com/tilemill/docs/manual/adding-layers/ which explains KML support in TileMill. I hope it will help.

KML is a standard geospatial data format that was popularized by Google with the Google Earth and Google Maps products. TileMill has limited support of KML – embedded styles will be ignored, and other features such as images, flythroughs, and 3D models are not supported. There is also no support for the compressed KMZ format at this time: to use a KMZ file, simply uncompress it as a zip file, and then use the resulting KML file.

share|improve this answer
    
thanks for your answer, but according to this it works somehow :support.mapbox.com/discussions/tilemill/…. I've read the documentation a few times :). –  flatronka Oct 8 '13 at 10:33
1  
@flatronka Can you pass on the KML you loaded in Tilemill to style so i can give it a try on my system and come up with some solution? –  Farhat Abbas Oct 8 '13 at 11:05
    
thank you for your time, here is dl.dropboxusercontent.com/u/27560194/example.kml –  flatronka Oct 8 '13 at 11:20
1  
I will check and will get back to you ASAP :) –  Farhat Abbas Oct 8 '13 at 18:45
    
thanks for your help. –  flatronka Oct 8 '13 at 19:54
show 1 more comment

Your Answer

 
discard

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.