crm icon indicating copy to clipboard operation
crm copied to clipboard

Whether OroCRM really needs the «Wind Speed Unit» and «Temperature Unit» options?

Open dmitrii-fediuk opened this issue 7 years ago • 2 comments

01

dmitrii-fediuk avatar May 23 '17 16:05 dmitrii-fediuk

Hi

These units are used by google maps.

mkudelya avatar May 24 '17 08:05 mkudelya

By why is this code block in a CRM at all?

if (this.options.showWeather) {
	var temperatureUnitKey = localeSettings.settings.unit.temperature.toUpperCase();
	var windSpeedUnitKey = localeSettings.settings.unit.wind_speed.toUpperCase();
	weatherLayer = new google.maps.weather.WeatherLayer({
		temperatureUnits: google.maps.weather.TemperatureUnit[temperatureUnitKey],
		windSpeedUnits: google.maps.weather.WindSpeedUnit[windSpeedUnitKey]
	});
	weatherLayer.setMap(this.map);

	cloudLayer = new google.maps.weather.CloudLayer();
	cloudLayer.setMap(this.map);
}

https://github.com/orocrm/platform/blob/2.1.2/src/Oro/Bundle/AddressBundle/Resources/public/js/mapservice/googlemaps.js#L79-L90

dmitrii-fediuk avatar May 24 '17 09:05 dmitrii-fediuk