Sha256: 35ddf738dd7f0f5ac6e15d7a833e027a0bd73a0ebd9eb867faa34dd163626573

Contents?: true

Size: 1.05 KB

Versions: 12

Compression:

Stored size: 1.05 KB

Contents

#
# Copyright (C) 2008 Pirmin Kalberer, Sourcepole AG
#
# This file is part of MapFish Server
#
# MapFish Server is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# MapFish Server is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with MapFish Server.  If not, see <http://www.gnu.org/licenses/>.
#

module GbMapfishAppserver
  module Array

    def to_geojson(options = {})
      geojson = '{"type": "FeatureCollection", "features": ['
      geojson << collect {|e| e.to_geojson(options) }.join(',')
      geojson << ']}'
      geojson
    end

  end
end

Array.class_eval do
  include GbMapfishAppserver::Array
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
gb_mapfish_appserver-1.1.1 lib/gb_mapfish_appserver/core_extensions.rb
gb_mapfish_appserver-1.1.0 lib/gb_mapfish_appserver/core_extensions.rb
gb_mapfish_appserver-1.0.6 lib/gb_mapfish_appserver/core_extensions.rb
gb_mapfish_appserver-1.0.5 lib/gb_mapfish_appserver/core_extensions.rb
gb_mapfish_appserver-1.0.4 lib/gb_mapfish_appserver/core_extensions.rb
gb_mapfish_appserver-1.0.3 lib/gb_mapfish_appserver/core_extensions.rb
gb_mapfish_appserver-1.0.2 lib/gb_mapfish_appserver/core_extensions.rb
gb_mapfish_appserver-1.0.1 lib/gb_mapfish_appserver/core_extensions.rb
gb_mapfish_appserver-1.0.0 lib/gb_mapfish_appserver/core_extensions.rb
gb_mapfish_appserver-0.9.7 lib/gb_mapfish_appserver/core_extensions.rb
gb_mapfish_appserver-0.9.6 lib/gb_mapfish_appserver/core_extensions.rb
gb_mapfish_appserver-0.9.5 lib/gb_mapfish_appserver/core_extensions.rb