spec/lib/zoom_level_spec.rb in map-kit-wrapper-0.0.3 vs spec/lib/zoom_level_spec.rb in map-kit-wrapper-0.0.4

- old
+ new

@@ -5,65 +5,65 @@ @map.frame = UIScreen.mainScreen.bounds @map.region = MapKit::CoordinateRegion.new([56, 10.6], [3.1, 3.1]) end it 'should return longitude_to_pixel_space_x' do - MapKit::MapView.longitude_to_pixel_space_x(30).should.equal 313174656 + MapKit::MapView.longitude_to_pixel_space_x(30).should.equal 313174699 end it 'should return latitude_to_pixel_space_y' do MapKit::MapView.latitude_to_pixel_space_y(90).should.equal 0 MapKit::MapView.latitude_to_pixel_space_y(-90).should.equal 536870912 MapKit::MapView.latitude_to_pixel_space_y(0).should.equal 268435456 end it 'should return pixel_space_x_to_longitude' do - MapKit::MapView.pixel_space_x_to_longitude(313174656).should.equal 29.999984741210 # 30 + MapKit::MapView.pixel_space_x_to_longitude(313174699).should.equal 29.9999923706055 # 30 end it 'should return pixel_space_y_to_latitude' do MapKit::MapView.pixel_space_y_to_latitude(0).should.equal 85.0511169433594 # 90 MapKit::MapView.pixel_space_y_to_latitude(536870912).should.equal -85.0511169433594 # -90 MapKit::MapView.pixel_space_y_to_latitude(268435456).should.equal 0 end it 'should return coordinate_span_with_map_view' do span = MapKit::MapView.coordinate_span_with_map_view(@map, CLLocationCoordinate2DMake(56, 10), 2) - span.latitudeDelta.should.equal 48.452224731445 - span.longitudeDelta.should.equal 56.25 + span.latitudeDelta.should.equal 48.4522247314453 + span.longitudeDelta.should.equal 56.2499694824219 end it 'should return set_center_coordinates' do @map.set_center_coordinates(CLLocationCoordinate2DMake(56, 10), 2, false) center = CoreLocation::DataTypes::LocationCoordinate.new(@map.region.center) span = MapKit::DataTypes::CoordinateSpan.new(@map.region.span) - span.latitude_delta.should.equal 48.4812927246094 + span.latitude_delta.should.equal 48.4522247314453 span.longitude_delta.should.equal 56.25 - center.latitude.should.equal 55.9737854003906 - center.longitude.should.equal 10.01953125 + center.latitude.should.equal 56.0 + center.longitude.should.equal 10.0 @map.set_center_coordinates(CLLocationCoordinate2DMake(0, 0), 50, false) @map.zoom_level.should.equal 18 end it 'should return set_map_lat_lon' do @map.set_map_lat_lon(56, 10, 2, false) center = CoreLocation::DataTypes::LocationCoordinate.new(@map.region.center) span = MapKit::DataTypes::CoordinateSpan.new(@map.region.span) - span.latitude_delta.should.equal 48.4812927246094 + span.latitude_delta.should.equal 48.4522247314453 span.longitude_delta.should.equal 56.25 - center.latitude.should.equal 55.9737854003906 - center.longitude.should.equal 10.01953125 + center.latitude.should.equal 56.0 + center.longitude.should.equal 10.0 end it 'should return coordinate_region_with_map_view' do view = MKMapView.alloc.init view.frame = @map.frame center = CLLocationCoordinate2DMake(56, 10) region = MapKit::MapView.coordinate_region_with_map_view(view, center, 2) center = CoreLocation::DataTypes::LocationCoordinate.new(region.center) span = MapKit::DataTypes::CoordinateSpan.new(region.span) span.latitude_delta.should.equal 48.4522247314453 - span.longitude_delta.should.equal 56.25 + span.longitude_delta.should.equal 56.2499694824219 center.latitude.should.equal 56.0 center.longitude.should.equal 10.0 end it 'should have a zoom_level' do \ No newline at end of file