<div dir="ltr"><div><div><div><div>Hi,<br><br></div>I am creating map key automatically on my MTB maps - <a href="http://mtbmap.cz">http://mtbmap.cz</a> (tab Legend). It is still full of cartographic and rendering mistakes, but it is just a matter of time to fix it. It is created automatically from mapnik xml style file for each zoom level. There is only extra "name" attribute created once by hand in each Rule element.<br>
<br></div>I can provide any other details if anyone is interested. Source codes are here (app styles): <a href="https://github.com/mattesCZ/mtbmap">https://github.com/mattesCZ/mtbmap</a><br><br></div>Cheers,<br></div>Martin<br>
<div class="gmail_extra"><br><br><div class="gmail_quote">2013/9/17 Peter K <span dir="ltr"><<a href="mailto:peathal@yahoo.de" target="_blank">peathal@yahoo.de</a>></span><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div>Thanks Yves for the pointer!<br>
      <br>
      Also the cloudmade support brought another project to my
      attention:<br>
      <a href="http://humangeo.github.io/leaflet-dvf/" target="_blank">http://humangeo.github.io/leaflet-dvf/</a><br>
      <br>
      See below where it reads: <i>Legends - Useful for visually
        informing users about the dynamic styles associated with your
        L.DataLayer instances</i><br>
      and<br>
      <i>L.Control.Legend - Add this control to your map to
        automatically display a dynamic legend for any L.DataLayer based
        instance that you add to your map</i>
      <blockquote>
      </blockquote>
      Regards,<br>
      Peter.<br>
      <br>
    </div><div><div class="h5">
    <blockquote type="cite">I
      spent some time 3 years ago on the subject, and came out with
      that: <a href="https://github.com/yvecai/RenderLegend" target="_blank">https://github.com/yvecai/RenderLegend</a>
      <br>
      Unfortunately, the demo website that was showing mapkeys for
      various styles, in various languages, and changing when zooming
      the map is not anymore.
      <br>
      <br>
      It's not usefull to try to create the legend automatically from a
      style. It was in xml at the time, but I doubt today's css change a
      lot in this matter: you'll need a full fledged sql parser.
      <br>
      I ended up with this as the entry point:
      <a href="https://github.com/yvecai/RenderLegend/blob/master/legend_compact.xml" target="_blank">https://github.com/yvecai/RenderLegend/blob/master/legend_compact.xml</a>
      <br>
      This kind of file should probably come in 2 version: a short one
      and a to-be-complete one.
      <br>
      <br>
      Hope this helps,
      <br>
      Yves
      <br>
      <br>
      On 09/16/2013 11:55 AM, Peter K wrote:
      <br>
      <blockquote type="cite">Hi,
        <br>
        <br>
        is there a kind of a standard or suggestion on how to retrieve
        the map
        <br>
        key? Like an http API or a leaflet plugin? On <a href="http://osm.org" target="_blank">osm.org</a> there is
        only the
        <br>
        'map key' data available for the default layer in the right box.
        And not
        <br>
        all details are given like here:
        <br>
        <a href="http://wiki.openstreetmap.org/wiki/DE:Map_Features" target="_blank">http://wiki.openstreetmap.org/wiki/DE:Map_Features</a>
        <br>
        <br>
        Someone knows some open source effort for more details and for
        support
        <br>
        of the various providers like mapquest, <a href="http://osm.de" target="_blank">osm.de</a>, cloudmade, ...?
        <br>
        <br>
        Kind Regards,
        <br>
        Peter.
        <br>
        <br>
        _______________________________________________
        <br>
        dev mailing list
        <br>
        <a href="mailto:dev@openstreetmap.org" target="_blank">dev@openstreetmap.org</a>
        <br>
        <a href="https://lists.openstreetmap.org/listinfo/dev" target="_blank">https://lists.openstreetmap.org/listinfo/dev</a>
        <br>
        .
        <br>
        <br>
      </blockquote>
      <br>
      <br>
      _______________________________________________
      <br>
      dev mailing list
      <br>
      <a href="mailto:dev@openstreetmap.org" target="_blank">dev@openstreetmap.org</a>
      <br>
      <a href="https://lists.openstreetmap.org/listinfo/dev" target="_blank">https://lists.openstreetmap.org/listinfo/dev</a>
      <br>
      <br>
    </blockquote>
    <br>
  </div></div></div>

<br>_______________________________________________<br>
dev mailing list<br>
<a href="mailto:dev@openstreetmap.org">dev@openstreetmap.org</a><br>
<a href="https://lists.openstreetmap.org/listinfo/dev" target="_blank">https://lists.openstreetmap.org/listinfo/dev</a><br>
<br></blockquote></div><br><br>
</div></div>