Package 

Class InfoWindow

    • Method Summary

      Modifier and Type Method Description
      void setRelatedObject(Object relatedObject) Allows to link an Object (any Object) to this marker.This is particularly useful to handle custom InfoWindow.
      Object getRelatedObject()
      MapView getMapView() may return null if the info window hasn't been attached yet
      View getView() Returns the Android view.
      void open(Object object, GeoPoint position, int offsetX, int offsetY) open the InfoWindow at the specified GeoPosition + offset.If it was already opened, close it before reopening.
      void draw() refresh the infowindow drawing.
      void close() hides the info window, which triggers another render of the map
      void onDetach() this destroys the window and all references to views
      boolean isOpen()
      static void closeAllInfoWindowsOn(MapView mapView) close all InfoWindows currently opened on this MapView
      static ArrayList<InfoWindow> getOpenedInfoWindowsOn(MapView mapView) return all InfoWindows currently opened on this MapView
      abstract void onOpen(Object item)
      abstract void onClose()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • InfoWindow

        InfoWindow(int layoutResId, MapView mapView)
        Parameters:
        layoutResId - the id of the view resource.
        mapView - the mapview on which is hooked the view
    • Method Detail

      • setRelatedObject

         void setRelatedObject(Object relatedObject)

        Allows to link an Object (any Object) to this marker.This is particularly useful to handle custom InfoWindow.

      • getMapView

         MapView getMapView()

        may return null if the info window hasn't been attached yet

      • getView

         View getView()

        Returns the Android view. This allows to set its content.

      • open

         void open(Object object, GeoPoint position, int offsetX, int offsetY)

        open the InfoWindow at the specified GeoPosition + offset.If it was already opened, close it before reopening.

        Parameters:
        object - the graphical object on which is hooked the view
        position - to place the window on the map
        offsetX - (&offsetY) the offset of the view to the position, in pixels.This allows to offset the view from the object position.
      • draw

         void draw()

        refresh the infowindow drawing. Must be called every time the view changes (drag, zoom,...).Best practice is to call this method in the draw method of its overlay.

      • close

         void close()

        hides the info window, which triggers another render of the map

      • onDetach

         void onDetach()

        this destroys the window and all references to views