anasrp08 / osmdroid

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

Patch for /trunk/osmdroid-android/src/org/osmdroid/views/MapView.java #148

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

This modification make MapView to extend ViewGroup. This allow to add views 
directly to it. It provides also some LayoutParams that permit to place the 
view regarding a given GPS point.

Regards,

Julien

Original issue reported on code.google.com by julien.d...@gmail.com on 27 Jan 2011 at 6:55

Attachments:

GoogleCodeExporter commented 9 years ago
Issue 84 has been merged into this issue.

Original comment by neilboyd on 28 Jan 2011 at 6:06

GoogleCodeExporter commented 9 years ago
This is not an svn patch. How do I apply it?

Original comment by neilboyd on 31 Jan 2011 at 8:45

GoogleCodeExporter commented 9 years ago
I give you my modified MapView class.

I just replace yours by mine and it works for me. I didn't checked for any 
further side effects.

Original comment by julien.d...@gmail.com on 31 Jan 2011 at 8:54

Attachments:

GoogleCodeExporter commented 9 years ago
Okay. At a superficial glance it looks okay. I'll try it later when I have some 
more time.  I'll have a look at the sample you attached to issue 84 to try and 
understand the purpose of this change.

It's missing a couple of changes from yesterday.

Original comment by neilboyd on 31 Jan 2011 at 11:10

GoogleCodeExporter commented 9 years ago
I notice that Google MapView also extends ViewGroup, so this would make it 
consistent.

Original comment by neilboyd on 1 Feb 2011 at 6:12

GoogleCodeExporter commented 9 years ago
I think this might make my problem go away.  Does it look like this might make 
it into trunk?

Original comment by macegh...@gmail.com on 25 Feb 2011 at 6:47

GoogleCodeExporter commented 9 years ago
I am going to try to merge this by hand. Next time, a SVN patch is preferred :)

Original comment by kurtzm...@gmail.com on 26 Feb 2011 at 10:50

GoogleCodeExporter commented 9 years ago
This was applied in r830

But could you please explain how to use the alignment extension to the 
LayoutParams? Does this need to be in the MapView class or would it be better 
suited in it's own class that extends MapView?

Original comment by kurtzm...@gmail.com on 26 Feb 2011 at 11:19

GoogleCodeExporter commented 9 years ago
I took a look at Google Maps and it looks like what you have follows similarly 
to what they do so I think the patch is good as-is and I think we can close 
this ticket!

Thank you for the contribution!

Original comment by kurtzm...@gmail.com on 2 Mar 2011 at 4:25

GoogleCodeExporter commented 9 years ago
Maybe this will help someone. I add the mapview to a RelativeLayout by hand, 
after r830 the map stopped showing, I needed to add:

LayoutParams params = new LayoutParams(
  LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT);
osmMapView.setLayoutParams(params);

Original comment by bob.hage...@gmail.com on 5 Mar 2011 at 9:17