Sha256: 93cff7df3f712b1098e6a762ae47ecd9bbe237bb2b0e7cd4210e35454ce3b2c0

Contents?: true

Size: 987 Bytes

Versions: 52

Compression:

Stored size: 987 Bytes

Contents

#
# wikiloc.rb: plugin embedding trip map on wikiloc.
#
# Copyright (C) 2008 MUNEDA Takahiro <mux03@panda64.net>
# You can redistribute it and/or modify it under GPL2.
#
# derived from everytrail.rb, Copyright (C) 2008 TADA Tadashi <sho@spc.gr.jp>
#
# Parameters:
#  @trip_id  : your trip id
#  @measures : on/off
#  @maptype  : M/S/H/T
#  @size     : [width,height]
#
#  Please see the following address about the details:
#   http://www.wikiloc.com/forum/posts/list/14.page
#
# ChangeLog:
#	20080706: Initial release
#	20080713: Change default parameters
#
def wikiloc( trip_id, measures = "off", maptype = "M", size = [500,400] )
	size.collect! {|i| i.to_i }
	size[0] = 500 if size[0] == 0
	size[1] = 400 if size[1] == 0
	%Q|<iframe frameBorder="0" src="http://www.wikiloc.com/wikiloc/spatialArtifacts.do?event=view&amp;id=#{h trip_id}&amp;measures=#{h measures}&amp;title=on&amp;near=on&amp;images=on&amp;maptype=#{maptype}" width="#{size[0]}px" height="#{size[1]}px"></iframe>|
end

Version data entries

52 entries across 46 versions & 2 rubygems

Version Path
tdiary-contrib-5.0.10 plugin/wikiloc.rb
tdiary-contrib-5.0.9 plugin/wikiloc.rb
tdiary-contrib-5.0.8 plugin/wikiloc.rb
tdiary-contrib-5.0.7 plugin/wikiloc.rb
tdiary-contrib-5.0.6 plugin/wikiloc.rb
tdiary-contrib-5.0.5 plugin/wikiloc.rb
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/bundler/gems/tdiary-contrib-8299b30cbf3f/plugin/wikiloc.rb
tdiary-5.0.5 vendor/bundle/bundler/gems/tdiary-contrib-fa9c20aa0d97/plugin/wikiloc.rb
tdiary-5.0.5 vendor/bundle/bundler/gems/tdiary-contrib-f08988dfa0f6/plugin/wikiloc.rb
tdiary-5.0.5 vendor/bundle/bundler/gems/tdiary-contrib-a3c5f37278c4/plugin/wikiloc.rb
tdiary-5.0.5 vendor/bundle/bundler/gems/tdiary-contrib-8299b30cbf3f/plugin/wikiloc.rb
tdiary-contrib-5.0.4 plugin/wikiloc.rb
tdiary-5.0.4 vendor/bundle/bundler/gems/tdiary-contrib-8299b30cbf3f/plugin/wikiloc.rb
tdiary-contrib-5.0.3 plugin/wikiloc.rb
tdiary-contrib-5.0.2 plugin/wikiloc.rb
tdiary-contrib-5.0.1 plugin/wikiloc.rb
tdiary-contrib-5.0.0 plugin/wikiloc.rb
tdiary-contrib-4.2.1 plugin/wikiloc.rb
tdiary-4.2.1 vendor/bundle/ruby/2.2.0/bundler/gems/tdiary-contrib-2ab36447ae2a/plugin/wikiloc.rb
tdiary-4.2.1 vendor/bundle/ruby/2.3.0/bundler/gems/tdiary-contrib-d189eb6688f1/plugin/wikiloc.rb