Permalink
Browse files

Handle altitudemodes better

  • Loading branch information...
1 parent 456c6e6 commit 7c90fc0578196503a0778615316e813f56152adf Joshua Tolley committed May 9, 2012
Showing with 5 additions and 5 deletions.
  1. +5 −5 lib/kamelopard/classes.rb
View
@@ -396,7 +396,7 @@ def point=(point)
else
a = point
end
- @point = Point.new a.longitude, a.latitude, a.altitude
+ @point = Point.new a.longitude, a.latitude, a.altitude, :altitudeMode => a.altitudeMode
end
end
@@ -1995,10 +1995,10 @@ def to_kml(elem = nil)
end
x << loc
Kamelopard.add_altitudeMode(@location.altitudeMode, x)
- @link.to_kml x
- @orientation.to_kml x
- @scale.to_kml x
- @resourceMap.to_kml x
+ @link.to_kml x unless @link.nil?
+ @orientation.to_kml x unless @orientation.nil?
+ @scale.to_kml x unless @scale.nil?
+ @resourceMap.to_kml x unless @resourceMap.nil?
elem << x unless elem.nil?
x
end

0 comments on commit 7c90fc0

Please sign in to comment.