const getWeather = function (mapInstance: any, city: string, type: string, callBack) {
  mapInstance.AMap.plugin('AMap.Weather', function () {
    const weather = new mapInstance.AMap.Weather();
    if (type === 'Live') {
      weather.getLive(city, function (err, data) {
        callBack(data);
      });
    } else if (type === 'Forecast') {
      weather.getForecast(city, function (err, data) {
        callBack(data);
      });
    }
  });
};
export default getWeather;
