[OSM-newbies] "Data CC-BY-SA by OpenStreetMap" not being rendered in map

Stephen Cavilia ailivac at gmail.com
Wed Nov 16 20:37:39 GMT 2011


Now I remember why. If you create a Map without specifying any controls
you get basic navigation and attribution by default. If you specify
anything for controls, this will replace the default, i.e. the
attribution control won't be there unless you add it yourself.

Steve


joe walko wrote:
> Hey guys,
> 
> Silly licensing question for you.  From:
> http://wiki.openstreetmap.org/wiki/Legal_FAQ, it says:
> 
> "If you are using OpenStreetMap data only, we request that your credit
> reads at least "Map data (c) OpenStreetMap contributors, CC-BY-SA". "
> 
> And by default, OpenLayers maps using OSM display the credit, as seen
> in this example: http://openlayers.org/dev/examples/osm.html
> 
> However, I'm not doing anything out of the ordinary, but that text is
> never displayed.  Here's the initial map setup:
> 
>       function init(lon, lat, w_city, alt_cities)
>   53         {
>   54
>   55
>   56             map = new OpenLayers.Map("prelogin-map", { controls: [
>   57                 new OpenLayers.Control.Navigation(),
>   58                 new OpenLayers.Control.PanZoomBar({zoomStopHeight: 4}),
>   59                 new OpenLayers.Control.ScaleLine(),
>   60                 new OpenLayers.Control.Permalink("reset"),
>   61                 //new OpenLayers.Control.MousePosition(),
>   62                 new OpenLayers.Control.OverviewMap()] });
>   63
>   64             // See: http://docs.openlayers.org/library/controls.html
>   65             map.addControl(new OpenLayers.Control.Navigation());
>   66             map.addLayer(new OpenLayers.Layer.OSM());
>   67             var point = new OpenLayers.Geometry.Point(lon, lat);
>   68             var user_circle = new OpenLayers.Feature.Vector(point);
>   69
>   70             // See:
> http://docs.openlayers.org/library/spherical_mercator.html
>   71             // if you want more detail on how to correctly render
> layers using various projections.
>   72             point.transform(new
> OpenLayers.Projection("EPSG:4326"), new
> OpenLayers.Projection("EPSG:900913"));
>   73             var vectorLayer = new OpenLayers.Layer.Vector("vector layer");
>   74             map.addLayer(vectorLayer);
> 
> 
> I want to display some type of credit, and I was wondering if anyone
> else had similar issues.
> 
> Thanks,
> 
> Joe
> 
> _______________________________________________
> newbies mailing list
> newbies at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/newbies



More information about the newbies mailing list