Class: MapKit::MapType

Inherits:
Object
  • Object
show all
Defined in:
lib/map-kit-wrapper/map_type.rb

Class Method Summary collapse

Class Method Details

.mkmap_to_rmap(map_type) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
# File 'lib/map-kit-wrapper/map_type.rb', line 3

def self.mkmap_to_rmap(map_type)
  case map_type
    when MKMapTypeStandard
      :standard
    when MKMapTypeSatellite
      :satellite
    when MKMapTypeHybrid
      :hybrid
    else
      raise "Unknown map type: #{map_type.inspect}"
  end
end

.rmap_to_mkmap(map_type) ⇒ Object



16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/map-kit-wrapper/map_type.rb', line 16

def self.rmap_to_mkmap(map_type)
  case map_type
    when :standard
      MKMapTypeStandard
    when :satellite
      MKMapTypeSatellite
    when :hybrid
      MKMapTypeHybrid
    else
      raise "Unknown map type: #{map_type.inspect}"
  end
end