Here Map Premium plan Map.InfoBubbleAdapter() ,hideInfoBubble ,getInfoBubbleContents and isInfoBubbleVisible...











up vote
0
down vote

favorite












I am trying to show the custom layout when user clicks on the marker object.
The basic pack code works properly .



However when i shifted to premium pack it does not have
Map.InfoBubbleAdapter(),hideInfoBubble,getInfoBubbleContents and isInfoBubbleVisible.



I am not even able to open the infoBubble when user click on marker too.



This is the code for custom view in basic pack i used.



  hereMap.get(new Map.InfoBubbleAdapter() {
@Override
public View getInfoBubbleContents(MapMarker mapMarker2) {
return null;
}

@Override
public View getInfoBubble(MapMarker mapMarker2) {
View view = LayoutInflater.from(getContext()).inflate(R.layout.layout_marker_infowindow, null);
TextView infoWindowText = view.findViewById(R.id.infoMessage);
infoWindowText.setText(mapMarker2.getTitle());
return view;
}
});


and this is the code that i was using on click of marker



  @Override
public boolean onMapObjectsSelected(List<ViewObject> objects) {

for (ViewObject object : objects) {
if (object.getBaseType() == ViewObject.Type.USER_OBJECT && ((MapObject) object).getType() == MapObject.Type.MARKER) {
MapMarker mapMarker = (MapMarker) object;
System.out.println("Title is................." + mapMarker.getTitle());

if (!mapMarker.isInfoBubbleVisible()) {
mapMarker.getInfoBubbleContents();
} else {
mapMarker.hideInfoBubble();
}
return true;
}
}


How can i show the custom info bubble when user click on the marker?










share|improve this question




























    up vote
    0
    down vote

    favorite












    I am trying to show the custom layout when user clicks on the marker object.
    The basic pack code works properly .



    However when i shifted to premium pack it does not have
    Map.InfoBubbleAdapter(),hideInfoBubble,getInfoBubbleContents and isInfoBubbleVisible.



    I am not even able to open the infoBubble when user click on marker too.



    This is the code for custom view in basic pack i used.



      hereMap.get(new Map.InfoBubbleAdapter() {
    @Override
    public View getInfoBubbleContents(MapMarker mapMarker2) {
    return null;
    }

    @Override
    public View getInfoBubble(MapMarker mapMarker2) {
    View view = LayoutInflater.from(getContext()).inflate(R.layout.layout_marker_infowindow, null);
    TextView infoWindowText = view.findViewById(R.id.infoMessage);
    infoWindowText.setText(mapMarker2.getTitle());
    return view;
    }
    });


    and this is the code that i was using on click of marker



      @Override
    public boolean onMapObjectsSelected(List<ViewObject> objects) {

    for (ViewObject object : objects) {
    if (object.getBaseType() == ViewObject.Type.USER_OBJECT && ((MapObject) object).getType() == MapObject.Type.MARKER) {
    MapMarker mapMarker = (MapMarker) object;
    System.out.println("Title is................." + mapMarker.getTitle());

    if (!mapMarker.isInfoBubbleVisible()) {
    mapMarker.getInfoBubbleContents();
    } else {
    mapMarker.hideInfoBubble();
    }
    return true;
    }
    }


    How can i show the custom info bubble when user click on the marker?










    share|improve this question


























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I am trying to show the custom layout when user clicks on the marker object.
      The basic pack code works properly .



      However when i shifted to premium pack it does not have
      Map.InfoBubbleAdapter(),hideInfoBubble,getInfoBubbleContents and isInfoBubbleVisible.



      I am not even able to open the infoBubble when user click on marker too.



      This is the code for custom view in basic pack i used.



        hereMap.get(new Map.InfoBubbleAdapter() {
      @Override
      public View getInfoBubbleContents(MapMarker mapMarker2) {
      return null;
      }

      @Override
      public View getInfoBubble(MapMarker mapMarker2) {
      View view = LayoutInflater.from(getContext()).inflate(R.layout.layout_marker_infowindow, null);
      TextView infoWindowText = view.findViewById(R.id.infoMessage);
      infoWindowText.setText(mapMarker2.getTitle());
      return view;
      }
      });


      and this is the code that i was using on click of marker



        @Override
      public boolean onMapObjectsSelected(List<ViewObject> objects) {

      for (ViewObject object : objects) {
      if (object.getBaseType() == ViewObject.Type.USER_OBJECT && ((MapObject) object).getType() == MapObject.Type.MARKER) {
      MapMarker mapMarker = (MapMarker) object;
      System.out.println("Title is................." + mapMarker.getTitle());

      if (!mapMarker.isInfoBubbleVisible()) {
      mapMarker.getInfoBubbleContents();
      } else {
      mapMarker.hideInfoBubble();
      }
      return true;
      }
      }


      How can i show the custom info bubble when user click on the marker?










      share|improve this question















      I am trying to show the custom layout when user clicks on the marker object.
      The basic pack code works properly .



      However when i shifted to premium pack it does not have
      Map.InfoBubbleAdapter(),hideInfoBubble,getInfoBubbleContents and isInfoBubbleVisible.



      I am not even able to open the infoBubble when user click on marker too.



      This is the code for custom view in basic pack i used.



        hereMap.get(new Map.InfoBubbleAdapter() {
      @Override
      public View getInfoBubbleContents(MapMarker mapMarker2) {
      return null;
      }

      @Override
      public View getInfoBubble(MapMarker mapMarker2) {
      View view = LayoutInflater.from(getContext()).inflate(R.layout.layout_marker_infowindow, null);
      TextView infoWindowText = view.findViewById(R.id.infoMessage);
      infoWindowText.setText(mapMarker2.getTitle());
      return view;
      }
      });


      and this is the code that i was using on click of marker



        @Override
      public boolean onMapObjectsSelected(List<ViewObject> objects) {

      for (ViewObject object : objects) {
      if (object.getBaseType() == ViewObject.Type.USER_OBJECT && ((MapObject) object).getType() == MapObject.Type.MARKER) {
      MapMarker mapMarker = (MapMarker) object;
      System.out.println("Title is................." + mapMarker.getTitle());

      if (!mapMarker.isInfoBubbleVisible()) {
      mapMarker.getInfoBubbleContents();
      } else {
      mapMarker.hideInfoBubble();
      }
      return true;
      }
      }


      How can i show the custom info bubble when user click on the marker?







      android here-api






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited yesterday









      Kling Klang

      32.1k156287




      32.1k156287










      asked yesterday









      Ravi Parmar

      84110




      84110
























          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          You should use sticky map overlays instead:
          https://developer.here.com/documentation/android-premium/api_reference_java/com/here/android/mpa/mapping/MapOverlay.html



          Then add your MapOverlay implementation to the Map via Map.addMapOverlay:
          https://developer.here.com/documentation/android-premium/api_reference_java/com/here/android/mpa/mapping/Map.html#addMapOverlay-com.here.android.mpa.mapping.MapOverlay-



          The idea behind is, that you can use a normal Views (very flexible, your own design, etc.) and stick it to a position on the map (and the map will keep it in place then). This gives you full flexibility on logic and design.






          share|improve this answer





















          • Same applies for iOS, and the corresponding iOS answer to this is stackoverflow.com/questions/52219434/…
            – Marco
            yesterday










          • how to create a onClick event on mapOverlay? For example i have 10 markers and i want to show one infoWindow at a time . I tried to add custom view in MapOverlay but its not taking it . Can you please give a example to follow .
            – Ravi Parmar
            yesterday










          • i tried this but the marker disappear after taping on map . mMapMarker = new MapMarker(geoCoordinate, marker_img); mMapMarker.setTitle(dataDisplay); View view = LayoutInflater.from(getContext()).inflate(R.layout.layout_marker_infowindow, null); TextView infoWindowText = view.findViewById(R.id.infoMessage); infoWindowText.setText(mMapMarker.getTitle()); MapOverlay mapOverlay = new MapOverlay(view, geoCoordinate); mapObjects.add(mMapMarker); hereMap.addMapObject(mMapMarker); hereMap.addMapOverlay(mapOverlay);
            – Ravi Parmar
            yesterday










          • The Marker also gets disapeard when zoom and only infoWindow is seen. How to fix this issue??
            – Ravi Parmar
            yesterday











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














           

          draft saved


          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53409090%2fhere-map-premium-plan-map-infobubbleadapter-hideinfobubble-getinfobubblecont%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          0
          down vote













          You should use sticky map overlays instead:
          https://developer.here.com/documentation/android-premium/api_reference_java/com/here/android/mpa/mapping/MapOverlay.html



          Then add your MapOverlay implementation to the Map via Map.addMapOverlay:
          https://developer.here.com/documentation/android-premium/api_reference_java/com/here/android/mpa/mapping/Map.html#addMapOverlay-com.here.android.mpa.mapping.MapOverlay-



          The idea behind is, that you can use a normal Views (very flexible, your own design, etc.) and stick it to a position on the map (and the map will keep it in place then). This gives you full flexibility on logic and design.






          share|improve this answer





















          • Same applies for iOS, and the corresponding iOS answer to this is stackoverflow.com/questions/52219434/…
            – Marco
            yesterday










          • how to create a onClick event on mapOverlay? For example i have 10 markers and i want to show one infoWindow at a time . I tried to add custom view in MapOverlay but its not taking it . Can you please give a example to follow .
            – Ravi Parmar
            yesterday










          • i tried this but the marker disappear after taping on map . mMapMarker = new MapMarker(geoCoordinate, marker_img); mMapMarker.setTitle(dataDisplay); View view = LayoutInflater.from(getContext()).inflate(R.layout.layout_marker_infowindow, null); TextView infoWindowText = view.findViewById(R.id.infoMessage); infoWindowText.setText(mMapMarker.getTitle()); MapOverlay mapOverlay = new MapOverlay(view, geoCoordinate); mapObjects.add(mMapMarker); hereMap.addMapObject(mMapMarker); hereMap.addMapOverlay(mapOverlay);
            – Ravi Parmar
            yesterday










          • The Marker also gets disapeard when zoom and only infoWindow is seen. How to fix this issue??
            – Ravi Parmar
            yesterday















          up vote
          0
          down vote













          You should use sticky map overlays instead:
          https://developer.here.com/documentation/android-premium/api_reference_java/com/here/android/mpa/mapping/MapOverlay.html



          Then add your MapOverlay implementation to the Map via Map.addMapOverlay:
          https://developer.here.com/documentation/android-premium/api_reference_java/com/here/android/mpa/mapping/Map.html#addMapOverlay-com.here.android.mpa.mapping.MapOverlay-



          The idea behind is, that you can use a normal Views (very flexible, your own design, etc.) and stick it to a position on the map (and the map will keep it in place then). This gives you full flexibility on logic and design.






          share|improve this answer





















          • Same applies for iOS, and the corresponding iOS answer to this is stackoverflow.com/questions/52219434/…
            – Marco
            yesterday










          • how to create a onClick event on mapOverlay? For example i have 10 markers and i want to show one infoWindow at a time . I tried to add custom view in MapOverlay but its not taking it . Can you please give a example to follow .
            – Ravi Parmar
            yesterday










          • i tried this but the marker disappear after taping on map . mMapMarker = new MapMarker(geoCoordinate, marker_img); mMapMarker.setTitle(dataDisplay); View view = LayoutInflater.from(getContext()).inflate(R.layout.layout_marker_infowindow, null); TextView infoWindowText = view.findViewById(R.id.infoMessage); infoWindowText.setText(mMapMarker.getTitle()); MapOverlay mapOverlay = new MapOverlay(view, geoCoordinate); mapObjects.add(mMapMarker); hereMap.addMapObject(mMapMarker); hereMap.addMapOverlay(mapOverlay);
            – Ravi Parmar
            yesterday










          • The Marker also gets disapeard when zoom and only infoWindow is seen. How to fix this issue??
            – Ravi Parmar
            yesterday













          up vote
          0
          down vote










          up vote
          0
          down vote









          You should use sticky map overlays instead:
          https://developer.here.com/documentation/android-premium/api_reference_java/com/here/android/mpa/mapping/MapOverlay.html



          Then add your MapOverlay implementation to the Map via Map.addMapOverlay:
          https://developer.here.com/documentation/android-premium/api_reference_java/com/here/android/mpa/mapping/Map.html#addMapOverlay-com.here.android.mpa.mapping.MapOverlay-



          The idea behind is, that you can use a normal Views (very flexible, your own design, etc.) and stick it to a position on the map (and the map will keep it in place then). This gives you full flexibility on logic and design.






          share|improve this answer












          You should use sticky map overlays instead:
          https://developer.here.com/documentation/android-premium/api_reference_java/com/here/android/mpa/mapping/MapOverlay.html



          Then add your MapOverlay implementation to the Map via Map.addMapOverlay:
          https://developer.here.com/documentation/android-premium/api_reference_java/com/here/android/mpa/mapping/Map.html#addMapOverlay-com.here.android.mpa.mapping.MapOverlay-



          The idea behind is, that you can use a normal Views (very flexible, your own design, etc.) and stick it to a position on the map (and the map will keep it in place then). This gives you full flexibility on logic and design.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered yesterday









          Marco

          1,6171018




          1,6171018












          • Same applies for iOS, and the corresponding iOS answer to this is stackoverflow.com/questions/52219434/…
            – Marco
            yesterday










          • how to create a onClick event on mapOverlay? For example i have 10 markers and i want to show one infoWindow at a time . I tried to add custom view in MapOverlay but its not taking it . Can you please give a example to follow .
            – Ravi Parmar
            yesterday










          • i tried this but the marker disappear after taping on map . mMapMarker = new MapMarker(geoCoordinate, marker_img); mMapMarker.setTitle(dataDisplay); View view = LayoutInflater.from(getContext()).inflate(R.layout.layout_marker_infowindow, null); TextView infoWindowText = view.findViewById(R.id.infoMessage); infoWindowText.setText(mMapMarker.getTitle()); MapOverlay mapOverlay = new MapOverlay(view, geoCoordinate); mapObjects.add(mMapMarker); hereMap.addMapObject(mMapMarker); hereMap.addMapOverlay(mapOverlay);
            – Ravi Parmar
            yesterday










          • The Marker also gets disapeard when zoom and only infoWindow is seen. How to fix this issue??
            – Ravi Parmar
            yesterday


















          • Same applies for iOS, and the corresponding iOS answer to this is stackoverflow.com/questions/52219434/…
            – Marco
            yesterday










          • how to create a onClick event on mapOverlay? For example i have 10 markers and i want to show one infoWindow at a time . I tried to add custom view in MapOverlay but its not taking it . Can you please give a example to follow .
            – Ravi Parmar
            yesterday










          • i tried this but the marker disappear after taping on map . mMapMarker = new MapMarker(geoCoordinate, marker_img); mMapMarker.setTitle(dataDisplay); View view = LayoutInflater.from(getContext()).inflate(R.layout.layout_marker_infowindow, null); TextView infoWindowText = view.findViewById(R.id.infoMessage); infoWindowText.setText(mMapMarker.getTitle()); MapOverlay mapOverlay = new MapOverlay(view, geoCoordinate); mapObjects.add(mMapMarker); hereMap.addMapObject(mMapMarker); hereMap.addMapOverlay(mapOverlay);
            – Ravi Parmar
            yesterday










          • The Marker also gets disapeard when zoom and only infoWindow is seen. How to fix this issue??
            – Ravi Parmar
            yesterday
















          Same applies for iOS, and the corresponding iOS answer to this is stackoverflow.com/questions/52219434/…
          – Marco
          yesterday




          Same applies for iOS, and the corresponding iOS answer to this is stackoverflow.com/questions/52219434/…
          – Marco
          yesterday












          how to create a onClick event on mapOverlay? For example i have 10 markers and i want to show one infoWindow at a time . I tried to add custom view in MapOverlay but its not taking it . Can you please give a example to follow .
          – Ravi Parmar
          yesterday




          how to create a onClick event on mapOverlay? For example i have 10 markers and i want to show one infoWindow at a time . I tried to add custom view in MapOverlay but its not taking it . Can you please give a example to follow .
          – Ravi Parmar
          yesterday












          i tried this but the marker disappear after taping on map . mMapMarker = new MapMarker(geoCoordinate, marker_img); mMapMarker.setTitle(dataDisplay); View view = LayoutInflater.from(getContext()).inflate(R.layout.layout_marker_infowindow, null); TextView infoWindowText = view.findViewById(R.id.infoMessage); infoWindowText.setText(mMapMarker.getTitle()); MapOverlay mapOverlay = new MapOverlay(view, geoCoordinate); mapObjects.add(mMapMarker); hereMap.addMapObject(mMapMarker); hereMap.addMapOverlay(mapOverlay);
          – Ravi Parmar
          yesterday




          i tried this but the marker disappear after taping on map . mMapMarker = new MapMarker(geoCoordinate, marker_img); mMapMarker.setTitle(dataDisplay); View view = LayoutInflater.from(getContext()).inflate(R.layout.layout_marker_infowindow, null); TextView infoWindowText = view.findViewById(R.id.infoMessage); infoWindowText.setText(mMapMarker.getTitle()); MapOverlay mapOverlay = new MapOverlay(view, geoCoordinate); mapObjects.add(mMapMarker); hereMap.addMapObject(mMapMarker); hereMap.addMapOverlay(mapOverlay);
          – Ravi Parmar
          yesterday












          The Marker also gets disapeard when zoom and only infoWindow is seen. How to fix this issue??
          – Ravi Parmar
          yesterday




          The Marker also gets disapeard when zoom and only infoWindow is seen. How to fix this issue??
          – Ravi Parmar
          yesterday


















           

          draft saved


          draft discarded



















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53409090%2fhere-map-premium-plan-map-infobubbleadapter-hideinfobubble-getinfobubblecont%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks

          Calculate evaluation metrics using cross_val_predict sklearn

          Insert data from modal to MySQL (multiple modal on website)