[Geomoose-users] Layer Attribution / Credits

James Klassen klassen.js at gmail.com
Mon Mar 11 16:19:00 PDT 2013


Copy Attribution.js from trunk to your GeoMoose extensions folder (it looks
like I forgot to push it up for 2.6.1) and enable the Attribution.js
extension in geomoose.html.

https://svn.osgeo.org/geomoose/geomoose2/trunk/htdocs/extensions/Attribution.js

Then add the attribution text to the map-source:

<map-source name="osm" tiled="true" type="xyz" reference="on">
<layer name="osm" status="off"/>
<url>
http://otile1.mqcdn.com/tiles/1.0.0/osm/${z}/${x}/${y}.png
</url>
<param name="numZoomLevels" value="20"/>
<param name="sphericalMercator" value="true"/>
<param name="attribution" value="Data, imagery and map information provided
by MapQuest, Open Street Map http://www.openstreetmap.org/ and
contributors, CC-BY-SA http://creativecommons.org/licenses/by-sa/2.0/"/>
</map-source>

On Mon, Mar 11, 2013 at 4:56 PM, TC Haddad <tchaddad at gmail.com> wrote:

> Thanks Jim,
>
> If you get a chance to dig up your prior solution that would be great.
> I foresee a need to make use of it quite a lot in one of my upcoming
> projects. I was hoping that OpenLayers would provide a path towards
> solving the attribution problem that wouldn't be too difficult to hook
> into from GeoMoose.
>
> Tanya
>
> On Mon, Mar 11, 2013 at 10:49 AM, James Klassen <klassen.js at gmail.com>
> wrote:
> > I am not at a computer right now so I can't check...
> >
> > There is a way to do this somewhere.   I implemented it for OSM license
> > compliance, but can't remember if I pushed it back upstream.  It uses the
> > OpenLayers method.
> >
> > On Mar 11, 2013 12:22 PM, "Eli Adam" <eadam at co.lincoln.or.us> wrote:
> >>
> >> Tanya,
> >>
> >> On Fri, Mar 8, 2013 at 5:34 PM, TC Haddad <tchaddad at gmail.com> wrote:
> >> >
> >> > How do you add a line of screen / map credits to a Geomoose
> application?
> >>
> >> In earlier version you could do something like this with MapServer
> >> where it is sort of part of the underlying map image.  This has
> >> several limitations and I haven't used it lately.  Here is a mediocre
> >> example that is placing it on screen in a hard coded position.
> >>
> >> LAYER
> >>   NAME credits
> >>   STATUS ON
> >>   TRANSFORM UL
> >>   TYPE ANNOTATION
> >>   FEATURE
> >>     POINTS 750 200 END
> >>     Text 'For official information, see http://example.com'
> >>   END
> >>   CLASS
> >>     LABEL
> >>       TYPE TrueType
> >>       FONT arial
> >>       SIZE 10
> >>       ANTIALIAS True
> >>       COLOR 75 75 75
> >>       POSITION UL
> >>       BACKGROUNDCOLOR 255 255 255
> >>       BUFFER 2
> >>     END
> >>   END
> >> END
> >>
> >> For an onscreen non-layer specific link/credit you can put something
> >> in the bottom bar where the coordinates display, check the footer
> >> here:
> >>
> http://trac.osgeo.org/geomoose/browser/geomoose2/trunk/htdocs/geomoose.html#L113
> >>
> >> >
> >> > I can see from the online demo that some of the base maps have credits
> >> > displaying (Google, Yahoo, etc) but others like MapQuest do not. I
> >> > looked
> >> > through the Mapbook.xml and documentation and didn't see how this was
> >> > being
> >> > handled.
> >>
> >> I think that these are fairly deeply baked into OL, GM and possibly
> >> the provider API.  You can start to get an idea of the origin of these
> >> from
> >>
> http://trac.osgeo.org/geomoose/browser/geomoose2/trunk/htdocs/build/theme/default/google.css
> >> and
> >>
> http://trac.osgeo.org/geomoose/browser/geomoose2/trunk/htdocs/build/theme/default/style.css
> >>
> >> Perhaps someone else can shed more light on the specifics of how these
> >> credits are sourced and propagated onto the screen?
> >>
> >> >
> >> > Technically the OSM data in the MapQuest layer requires a screen
> credit
> >> > to
> >> > comply with the OSM license, which is what got me started on this. But
> >> > it
> >> > would also be nice to know how to add a credit line for any other
> sorts
> >> > of
> >> > layers too.
> >> >
> >>
> >> Right now, the MapQuest layers seem to be accessed by generic TMS and
> >> Google, Yahoo, etc are accessed through their APIs.  There may be a
> >> similar method for MapQuest as Google, Yahoo, etc.
> >> http://developer.mapquest.com/web/products/open/map#openlayers and
> >> http://developer.mapquest.com/web/products/open/sdk may be good places
> >> to start for that.
> >>
> >> You may want to separate out just the MapQuest/OSM attribution issue
> >> and open a ticket so that it doesn't get forgotten.
> >>
> >> Best Regards, Eli
> >> _______________________________________________
> >> Geomoose-users mailing list
> >> Geomoose-users at lists.osgeo.org
> >> http://lists.osgeo.org/mailman/listinfo/geomoose-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geomoose-users/attachments/20130311/872c2c73/attachment.html>


More information about the Geomoose-users mailing list