0

Below mentioned code which I have used in my application:

onKeyEntered:

@Override
public void onKeyEntered(String key, GeoLocation location) {
   // Add a new marker to the map         
   Marker marker = this.map.addMarker(new MarkerOptions().position(new   LatLng(location.latitude, location.longitude)));
   this.markers.put(key, marker); //Getting the error here

onKeyExited:

@Override
public void onKeyExited(String key) {
   // Remove any old marker 
   Marker marker = this.markers.get(key); //Getting the error here
   if (marker != null) {
      marker.remove();
      this.markers.remove(key);
   }

Please suggest what function we can use?

swiftBoy
  • 35,607
  • 26
  • 136
  • 135

0 Answers0