android - Changing OSMDroid's MyLocationOverlay marker -


i want change marker in mylocationoverlay. i've tried far subclassing osmdroid's mylocationoverlay , overriding default marker, using code provided in this answer. however, didn't work (i got error: method drawmylocation must override or implement supertype method commenting @override solved it).

however, marker image stays same (the question asked google maps api, whereas i'm using osmdroid) - how can solve it?

you have few options here. first, let me suggest use mylocationnewoverlay in osmdroid. original mylocationoverlay has been deprecated. can

  1. create own resourceproxy provides custom bitmap.person resource.
  2. create subclass , modify mpersonbitmap , optionally mpersonhotspot make sure custom image aligned properly.
  3. the method signature looking override per linked answer is:

    protected void drawmylocation(final isafecanvas canvas, final mapview mapview, final location lastfix) 

Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -