Print

Print


Hi Chris,

the only think I could add to your work is a tip for display. It works
with Mapstraction library (http://mapstraction.com/) and it is
attributed to Adam Duvander, he described it in Map Scripting 101 (No
Stratch Press, 2010) pp. 109-110.

The following snippet saves the position of the map at the time user
opens a marker's info box, and restore this position when user closes
the info box. Sometime the info box moves the map, and when user
closes it, the original marker is not visible since the viewport was
shifted.

When you create a marker you might want to do like this:

var mk = new mxn.Marker(point);
...
mk.openInfoBubble.addHandler(myboxopened);
mk.closeInfoBubble.addHandler(myboxclosed);
mapstraction.addMarker(mk);

function myboxopened(event_name, event_source, event_args) {
  mapcenter = mapstransaction.getCenter();
}

function myboxclosed(event_name, event_source, event_args) {
  mapstransaction.setCenter(mapcenter, {pan: true});
}

Mapstraction is an abstraction library works with different map APIs
(Google, Yahoo!, MS etc.), and even if you don't use, it is
translatable into native APIs. Of course it won't work in the case
when the Jobs Map is NOT integrated into the main Google Map page
(https://maps.google.com/maps?q=http://jobs.code4lib.org/feed/), but
only if you create a distinct page, and you use the map's API.

Regards,
Péter

2013/2/24 Chris Fitzpatrick <[log in to unmask]>:
> hi,
> has anyone volunteered for the mapping feature? if not, I'd like to take a
> crack at it as I am wanting to get more practical django experience under
> my belt. and since this list has gotten me two jobs, I would love to give
> some payback.  just dont want to duplicate any work someone else has
> started. b, chris.
> On 24 Feb 2013 20:08, "Gary McGath" <[log in to unmask]> wrote:
>
>> It works very nicely with Sage, which is what I use to follow feeds.
>> Thanks!
>>
>> On 2/24/13 1:45 PM, Ed Summers wrote:
>> > Hi Gary,
>> >
>> > Great idea, and it was easy to implement. For example you can now get
>> > tag related feeds:
>> >
>> >     http://jobs.code4lib.org/feed/tag/digital-preservation/
>> >     http://jobs.code4lib.org/feed/tag/python/
>> >     http://jobs.code4lib.org/feed/tag/web-archiving/
>> >     http://jobs.code4lib.org/feed/tag/fedora-repository-architecture/
>> >     etc ...
>> >
>>
>>
>>
>> --
>> Gary McGath, Professional Software Developer
>> http://www.garymcgath.com
>>



-- 
Péter Király
software developer

Europeana - http://europeana.eu
eXtensible Catalog - http://eXtensibleCatalog.org