code: def clearkml(self):
          '''Clear the kmls from the map'''
          #go through all the current layers and remove them
          for layer in self.curlayers:
              self.mpstate.map.remove_object(layer)
          for layer in self.curtextlayers:
              self.mpstate.map.remove_object(layer)
          self.allayers = []
          self.curlayers = []
          self.alltextlayers = []
          self.curtextlayers = []
          self.menu_needs_refreshing = Truf clearkml(self):
          '''Clear the kmls from the map'''
          #go through all the current layers and remove them
          for layer in self.curlayers:
              self.mpstate.map.remove_object(layer)
          for layer in self.curtextlayers:
              self.mpstate.map.remove_object(layer)
          self.allayers = []
          self.curlayers = []
          self.alltextlayers = []
          self.curtextlayers = []
          self.menu_needs_refreshing = True
docs: Clear the kmls from the map