Iphone Presence dedection

I found example rules who to calculate the distance from home and tried to built my own one.
I get an type mismatch error on the distanceFrom method. “Cannot convert PointType to LocationItem”
All examples I have found use a PointType as argument for the distanceFrom method.
Does anyone know why this is not working (anymore)?

I am still using OH 2.5
Items: Location Timons_iPhone_Ort

rule "Anwesenheit Timon"
when 
Item Timons_iPhone_Ort changed
then
val PointType gps_zuhause = new PointType(new DecimalType(48.1577637), new DecimalType(16.2796942))
var int gps_timon_entfernung_zuhause
gps_timon_entfernung_zuhause = Timons_iPhone_Ort.distanceFrom(gps_zuhause).intValue()
logInfo("Anwesenheit Timon", "Entfernung Timon {}",gps_timon_entfernung_zuhause)
}
end

end

Does that Group wise distance calculation for variable locations in a group (.distancefrom on String) - #5 by NCO help ?

This way it works, but it is not logical for me.

rule "Anwesenheit Timon"

when 

Item Timons_iPhone_Ort changed or

Item Test changed

then

val PointType gps_zuhause = new PointType(new DecimalType(48.1577637), new DecimalType(16.2796942))

val PointType ort = Timons_iPhone_Ort.state as PointType

var int gps_timon_entfernung_zuhause

gps_timon_entfernung_zuhause = ort.distanceFrom(gps_zuhause).intValue()

logInfo("Anwesenheit Timon", "Entfernung Timon {}",gps_timon_entfernung_zuhause)

end