git-printa / osmbonuspack

Automatically exported from code.google.com/p/osmbonuspack
0 stars 0 forks source link

Use of IGeoPoint instead of GeoPoint #82

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I was in need of my own implementation of IGeoPoint for some internal purpose, 
only to see the osmbonuspack uses the plain old implemented GeoPoint for no 
apparent reason.

With a read only copy of the project, using IGeoPoint where i'd needed it seems 
to work flawlessly, save for the position.close used in Marker.setPosition. I 
use a direct assignation because i can live with the side effect.

I am not skilled enough both in Java neither in your library to dare a commit, 
but I think it may be beneficial to use the osmdroid.api interfaces instead of 
the hardcoded object.

This is just my opinion. Your pack is awesome and totally needed with OSMDroid !

Thanks.

Original issue reported on code.google.com by tidiu...@gmail.com on 21 Aug 2014 at 1:59

GoogleCodeExporter commented 8 years ago
My previous attempt to use IGeoPoint was leading to a lot of casting needed. 

For your need, sub-classing GeoPoint was not feasible?
Is your need restricted to Marker, or does it apply to other classes?

I would also be interested if other users express such a need. 

Original comment by mathieu....@gmail.com on 25 Aug 2014 at 10:47

GoogleCodeExporter commented 8 years ago
My GeoPoint was already subclassing another class, and since Java didn't allow 
multiple inheritance, I can only use IGeoPoint in this case.

My need was quite simple, I only needed that for Marker. I haven't gone deep in 
the pack.

Original comment by tidiu...@gmail.com on 25 Aug 2014 at 10:51