|
Revision 17796, 0.9 kB
(checked in by mux03, 4 months ago)
|
|
added a new plugin for wikiloc.com
|
| Line | |
|---|
| 1 | # |
|---|
| 2 | # wikiloc.rb: plugin embedding trip map on wikiloc. |
|---|
| 3 | # |
|---|
| 4 | # Copyright (C) 2008 MUNEDA Takahiro <mux03@panda64.net> |
|---|
| 5 | # You can redistribute it and/or modify it under GPL2. |
|---|
| 6 | # |
|---|
| 7 | # derived from everytrail.rb, Copyright (C) 2008 TADA Tadashi <sho@spc.gr.jp> |
|---|
| 8 | # |
|---|
| 9 | # Parameters: |
|---|
| 10 | # @trip_id : your trip id |
|---|
| 11 | # @measures : on/off |
|---|
| 12 | # @maptype : M/S/H/T |
|---|
| 13 | # @size : [width,height] |
|---|
| 14 | # |
|---|
| 15 | # Please see the following address about the details: |
|---|
| 16 | # http://www.wikiloc.com/forum/posts/list/14.page |
|---|
| 17 | # |
|---|
| 18 | # ChangeLog: |
|---|
| 19 | # 20080706: Initial release |
|---|
| 20 | # 20080713: Change default parameters |
|---|
| 21 | # |
|---|
| 22 | def wikiloc( trip_id, measures = "off", maptype = "M", size = [500,400] ) |
|---|
| 23 | size.collect! {|i| i.to_i } |
|---|
| 24 | size[0] = 500 if size[0] == 0 |
|---|
| 25 | size[1] = 400 if size[1] == 0 |
|---|
| 26 | %Q|<iframe frameBorder="0" src="http://www.wikiloc.com/wikiloc/spatialArtifacts.do?event=view&id=#{h trip_id}&measures=#{h measures}&title=on&near=on&images=on&maptype=#{maptype}" width="#{size[0]}px" height="#{size[1]}px"></iframe>| |
|---|
| 27 | end |
|---|