Layer on map

General topics about the Android-Platform itself.
Coding issues please to the subforum right below.

Layer on map

Postby jarmohak » Mon Jan 14, 2008 9:47 am

Hello. I was wondering, if it's possible to create a layer above map, so normal map controls could still be used, like zooming with mouse and panning. It could be nice to create a button above map and still use normally map controls. Thanks in advance
jarmohak
Freshman
Freshman
 
Posts: 4
Joined: Sun Jan 13, 2008 1:13 pm

Top

Postby plusminus » Mon Jan 14, 2008 5:34 pm

Hello jarmohak,

does the Overlay-Stuff from the FriendFinder-Tutorial :arrow: :src: http://www.anddev.org/viewtopic.php?t=92 help you further :?:

Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Postby jarmohak » Mon Jan 14, 2008 9:34 pm

Thank You for your answer.

I've been looking that FriendFinder for awhile, but it haven't been any help for me, or I'm just stupid :) Might be time to take a break for couple of days, and look again with a "fresh mind". Anyways, if you have straight solution to my problem, I would really appreciate that.
jarmohak
Freshman
Freshman
 
Posts: 4
Joined: Sun Jan 13, 2008 1:13 pm

Postby plusminus » Mon Jan 14, 2008 9:44 pm

Hello jarmohak,

From your posts i extracted that you want to do sth. like this...
Image
... right :?:

So you will need a class extending Overlay, like this one:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.     protected class MyLocationOverlay extends Overlay {
  2.         @Override
  3.         public void draw(Canvas canvas, PixelCalculator calculator, boolean shadow) {
  4.           super.draw(canvas, calculator, shadow);
  5.           // Setup our "brush"/"pencil"/ whatever...
  6.  
  7.           // Draw Circles, Bitmaps whatever...
Parsed in 0.033 seconds, using GeSHi 1.0.8.4


So we create a new OverlayController from the MapView and set a new MyLocationOverlay to it, like this:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.           /* With these objects we are capable of
  2.            * drawing graphical stuff on top of the map */
  3.           this.myOverlayController = this.myMapView.createOverlayController();
  4.           MyLocationOverlay myLocationOverlay = new MyLocationOverlay();
  5.           this.myOverlayController.add(myLocationOverlay, true);
Parsed in 0.032 seconds, using GeSHi 1.0.8.4


Hope this pushed you into the right direction. :)

Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Postby jarmohak » Tue Jan 15, 2008 12:10 am

Okay, might be really time for that break. But since I've tried like that wise, all those times map hasn't moved at all. Thank you anyways :)
jarmohak
Freshman
Freshman
 
Posts: 4
Joined: Sun Jan 13, 2008 1:13 pm

Postby plusminus » Tue Jan 15, 2008 12:12 am

Hello jarmohak,

should be moveable, as it also works with the FriendFinder :)

Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Top

Postby problem » Tue Jan 15, 2008 1:30 am

am i correct in saying that the functionality of clicking on a marker and display more information isn't in the sdk yet?
problem
Freshman
Freshman
 
Posts: 6
Joined: Mon Dec 31, 2007 6:07 pm
Location: Mesa, AZ

Postby jarmohak » Fri Jan 18, 2008 10:47 pm

probably. since i really dont know. OFC prob. is the knowledge. But as far as i see, its not possible to set buttons on overlay. ->without XMLs am i correct, with point coorsinates???... If is it possible can you help me out, since i have been struggling with this quite a while.
jarmohak
Freshman
Freshman
 
Posts: 4
Joined: Sun Jan 13, 2008 1:13 pm

Top

Return to General

Who is online

Users browsing this forum: No registered users and 2 guests