Android Question how to add a label in gmap

Discussion in 'Android Questions' started by customnames, Jan 29, 2015.

  1. customnames

    customnames Member Licensed User

    I am trying to add a label or button to a gmap like addmarker
    how would someone go about doing this

    I have added a button to the layout but it won't show when run
  2. Erel

    Erel Administrator Staff Member Licensed User

    You cannot add a view to the map.
  3. eurojam

    eurojam Well-Known Member Licensed User

    like Erel said, it is not possible to use buttons and so on in the InfoWindowAdapter, even if you load an layout in it. The only way is to listen for marker click events with OnMarkerClickListener and display your own complete view directly, which will be some work...
    Alternativly you can use the OnInfoWindowClickListener to raise an event when the user clicks the google maps InfoWindow.
  4. customnames

    customnames Member Licensed User

    I have seen other apps which have a button and showing data in a label
    app like hailo, how would I go about doing it as just clicking randomly on the map would not convey
    to the user what was required ?
  5. customnames

    customnames Member Licensed User

    OK I found out how to add controls to maps using panels
    exactly what I was looking for Thanks
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice