JSFiddle - React, Tailwind, and code Playground

by Gonzalo

JavaScript

define(

	[
		'jquery',
		'underscore',
		'backbone',
		'globals',
		'views/app/overviewCountryView',
		'eventHelper',
		'accounting'
	],

	function($, _, Backbone, Globals, OverviewCountryView, eventHelper, accounting) {

		var MapView = Backbone.View.extend({
			id: 'map',
			initialize: function() {
				_.bindAll(this);
				eventHelper.on('addMarker', this.addMarker);
				eventHelper.on('clearMarker', this.clearMarker);
				eventHelper.on('createGeoCoding', this.createGeoCoding);
				eventHelper.on('addClusters', this.addClusters);
				eventHelper.on('clearClusters', this.clearClusters);
				eventHelper.on('clearMap', this.clearMap);
				eventHelper.on('showMarkers', this.showMarkers);
				eventHelper.on('showClusters', this.showClusters);
				eventHelper.on('resetMap', this.resetMap);
				eventHelper.on('addMarkerToCluster', this.addMarkerToCluster);
				eventHelper.on('centerMap', this.centerMap);
				eventHelper.on('addInfowindow', this.addInfowindow);
				eventHelper.on('closeInfowindow', this.closeInfowindow);
				eventHelper.on('addOverlay', this.addOverlay);
				eventHelper.on('hideOverlay', this.hideOverlay);
				//eventHelper.on('createGeoCoding', this.createGeoCoding);
			},
			render: function() {				
				this.createMap();
				return this;
			},
			getOptionsMap: function(){				
				return ({
					zoom:2,
					maxZoom: 10,
					minZoom:2,
					center: [0, 0],
					scrollwheel: true,
					streetViewControl: false,
					mapTypeControl: true,
					panControl: true,
					styles: this.getStyleMap(),
					panControlOptions: {
						position: google.maps.ControlPosition.TOP_RIGHT
					},
					zoomControl: true,
					zoomControlOptions: {
						style: google.maps.ZoomControlStyle.LARGE,
						position: google.maps.ControlPosition.TOP_RIGHT
					}
				});
			},
			getStyleMap: function(){
				return [                                    
					{featureType: "road.highway", stylers: [ {visibility: "on"} ]},
					{featureType: "road.arterial", stylers: [...