Class Ym4r::GmPlugin::PreTiledLayer
In: lib/gm_plugin/layer.rb
Parent: GTileLayer

Represents a pre tiled layer, taking images directly from a server, without using a server script.

Methods

get_tile_url   new  

Attributes

base_url  [RW] 

Public Class methods

Possible options are the same as for the GTileLayer constructor

[Source]

    # File lib/gm_plugin/layer.rb, line 74
74:       def initialize(base_url,options = {})
75:         super(options)
76:         @base_url = base_url
77:       end

Public Instance methods

Returns the code to determine the url to fetch the tile. Follows the convention adopted by the tiler: {base_url}/tile_{b}_{a.x}_{a.y}.{format}

[Source]

    # File lib/gm_plugin/layer.rb, line 80
80:       def get_tile_url
81:         "function(a,b) { return '#{@base_url}/tile_' + b + '_' + a.x + '_' + a.y + '.#{format}';}"
82:       end

[Validate]