gmapz 2.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +14 -0
- data/Gemfile +4 -0
- data/LICENSE.md +21 -0
- data/LICENSE.txt +22 -0
- data/README.md +83 -0
- data/Rakefile +2 -0
- data/gmapz.gemspec +23 -0
- data/lib/gmapz.rb +6 -0
- data/lib/gmapz/engine.rb +13 -0
- data/lib/gmapz/version.rb +3 -0
- data/src/css/gmapz-responsive.css +106 -0
- data/src/css/gmapz-sample-infobox.scss +125 -0
- data/src/img/gmapz/ic_clear_black_18px.svg +1 -0
- data/src/img/gmapz/pin-blue.png +0 -0
- data/src/img/gmapz/pin-cluster.png +0 -0
- data/src/img/gmapz/pin-green.png +0 -0
- data/src/img/gmapz/pin-orange.png +0 -0
- data/src/img/gmapz/pin-user-location.png +0 -0
- data/src/img/gmapz/pin.png +0 -0
- data/src/img/gmapz/scroll_disabled.svg +1 -0
- data/src/img/gmapz/scroll_enabled.svg +4 -0
- data/src/js/gmapz-dependencies/markerclusterer.js +1290 -0
- data/src/js/gmapz/gmapz.autocomplete.js +109 -0
- data/src/js/gmapz/gmapz.js +179 -0
- data/src/js/gmapz/gmapz.locations.js +474 -0
- data/src/js/gmapz/gmapz.map.js +789 -0
- data/src/js/gmapz/gmapz.pins.js +40 -0
- data/src/js/ready.js +389 -0
- metadata +102 -0
@@ -0,0 +1,109 @@
|
|
1
|
+
//
|
2
|
+
// Creates instances of GMapz autocomplete
|
3
|
+
//
|
4
|
+
GMapz.autocomplete = (function() {
|
5
|
+
|
6
|
+
function Constructor($input, user_settings) {
|
7
|
+
|
8
|
+
if($input.length === 0) {
|
9
|
+
if (GMapz.debug) console.warn("<input> '"+$input.selector+"' not found!");
|
10
|
+
return false;
|
11
|
+
}
|
12
|
+
|
13
|
+
// Autocomplete
|
14
|
+
this.$input = $input; // JQuery selector
|
15
|
+
this.input_id = null; // string ID
|
16
|
+
this.instance = null;
|
17
|
+
this.listener = null;
|
18
|
+
|
19
|
+
// User settings
|
20
|
+
if(typeof user_setting === 'undefined') {
|
21
|
+
user_settings = {};
|
22
|
+
}
|
23
|
+
|
24
|
+
// Data and internal config
|
25
|
+
this.config = {
|
26
|
+
is_initialized: false,
|
27
|
+
};
|
28
|
+
|
29
|
+
// ID único del mapa
|
30
|
+
if (this.$input.attr('data-gmapz-autocomplete')) {
|
31
|
+
this.input_id = this.$input.attr('data-gmapz-autocomplete');
|
32
|
+
} else {
|
33
|
+
this.input_id = GMapz.getUniqueId(8,'ac-');
|
34
|
+
this.$input.attr('data-gmapz-autocomplete', this.input_id);
|
35
|
+
}
|
36
|
+
|
37
|
+
// Autocomplete settings on initialization
|
38
|
+
this.autocomplete_settings = {
|
39
|
+
types: ['geocode'],
|
40
|
+
offset: 3 //,
|
41
|
+
// componentRestrictions: { 'country': 'es' }
|
42
|
+
};
|
43
|
+
|
44
|
+
// Extend settings
|
45
|
+
$.extend(this.autocomplete_settings, user_settings);
|
46
|
+
|
47
|
+
// Attach objecto DOM element
|
48
|
+
$input[0].gmapz = this;
|
49
|
+
|
50
|
+
// Request GM Api, instanceReady() will be called when done
|
51
|
+
GMapz.requestAPI();
|
52
|
+
}
|
53
|
+
|
54
|
+
Constructor.prototype = {
|
55
|
+
|
56
|
+
//
|
57
|
+
// Methods
|
58
|
+
//
|
59
|
+
|
60
|
+
instanceReady: function(e) {
|
61
|
+
if (GMapz.debug) console.info("'"+this.input_id+"' instance initialized");
|
62
|
+
|
63
|
+
var that = this;
|
64
|
+
|
65
|
+
this.config.is_initialized = true;
|
66
|
+
|
67
|
+
this.instance = new google.maps.places.Autocomplete(
|
68
|
+
this.$input[0],
|
69
|
+
this.autocomplete_settings
|
70
|
+
);
|
71
|
+
|
72
|
+
this.listener = google.maps.event.addListener(this.instance, 'place_changed', function(){
|
73
|
+
that.onChange(this);
|
74
|
+
});
|
75
|
+
|
76
|
+
this.onReady();
|
77
|
+
},
|
78
|
+
|
79
|
+
//
|
80
|
+
// Eventos
|
81
|
+
//
|
82
|
+
|
83
|
+
// Override from outside
|
84
|
+
onReady: function() {
|
85
|
+
if (GMapz.debug) console.info("'"+this.input_id+"' autocomplete instance is ready");
|
86
|
+
},
|
87
|
+
|
88
|
+
// Override from outside
|
89
|
+
onChange: function () {
|
90
|
+
/*
|
91
|
+
map_5.deleteAllMarkers();
|
92
|
+
var locs = {};
|
93
|
+
var place = this.instance.getPlace();
|
94
|
+
locs['autocomplete'] = {
|
95
|
+
lat: place.geometry.location.A,
|
96
|
+
lng: place.geometry.location.F,
|
97
|
+
draggable:true,
|
98
|
+
title:"Drag me!"
|
99
|
+
};
|
100
|
+
map_5.fitToPlace(place);
|
101
|
+
*/
|
102
|
+
}
|
103
|
+
|
104
|
+
};
|
105
|
+
|
106
|
+
return Constructor;
|
107
|
+
|
108
|
+
})();
|
109
|
+
|
@@ -0,0 +1,179 @@
|
|
1
|
+
/*
|
2
|
+
====================================
|
3
|
+
GMapz. Yet another gmaps manager
|
4
|
+
by carlos Cabo 2015. V.2.09
|
5
|
+
https://github.com/carloscabo/gmapz
|
6
|
+
====================================
|
7
|
+
*/
|
8
|
+
|
9
|
+
/**
|
10
|
+
* Core and general tools
|
11
|
+
*/
|
12
|
+
(function($, undefined) {
|
13
|
+
'use strict';
|
14
|
+
|
15
|
+
// Singleton
|
16
|
+
if (typeof window.GMapz !== 'undefined') {
|
17
|
+
return;
|
18
|
+
}
|
19
|
+
|
20
|
+
//
|
21
|
+
// Module general vars
|
22
|
+
//
|
23
|
+
var
|
24
|
+
v = '2.09',
|
25
|
+
debug = false,
|
26
|
+
data = {
|
27
|
+
map_api_requested: false,
|
28
|
+
map_api_ready: false
|
29
|
+
},
|
30
|
+
pins = null,
|
31
|
+
lang = '',
|
32
|
+
APIKEY = '';
|
33
|
+
|
34
|
+
//
|
35
|
+
// Methods
|
36
|
+
//
|
37
|
+
|
38
|
+
// Return uniqueID string.
|
39
|
+
function getUniqueId (len, prefix) {
|
40
|
+
var
|
41
|
+
chars = 'abcdefghiklmnopqrstuvwxyzABCDEFGHIKLMNOPQRSTUVWXYZ'.split(''),
|
42
|
+
uniqid = '';
|
43
|
+
if (!len) { len = Math.floor(Math.random() * chars.length); }
|
44
|
+
for (var i = 0; i < len; i++) {
|
45
|
+
uniqid += chars[Math.floor(Math.random() * chars.length)];
|
46
|
+
}
|
47
|
+
if (prefix) {
|
48
|
+
uniqid = prefix + uniqid;
|
49
|
+
}
|
50
|
+
// one last step is to check if this ID is already taken by an element before
|
51
|
+
return uniqid;
|
52
|
+
}
|
53
|
+
|
54
|
+
// Request API
|
55
|
+
function requestAPI (callback_fn) {
|
56
|
+
if (!data.map_api_requested) {
|
57
|
+
if (typeof callback_fn === 'undefined') {
|
58
|
+
callback_fn = 'GMapz.onApiReady';
|
59
|
+
}
|
60
|
+
data.map_api_requested = true;
|
61
|
+
loadScript( callback_fn );
|
62
|
+
}
|
63
|
+
}
|
64
|
+
|
65
|
+
// Inject GM Api
|
66
|
+
function loadScript (callback_fn) {
|
67
|
+
if (lang === '') {
|
68
|
+
lang = $('html').attr('lang') || $('html').attr('xml:lang') || 'en';
|
69
|
+
}
|
70
|
+
var
|
71
|
+
script = document.createElement('script'),
|
72
|
+
url = 'https://maps.googleapis.com/maps/api/js?v=3.exp&signed_in=true&libraries=places&language='+lang+'&callback='+callback_fn;
|
73
|
+
if (GMapz.APIKEY !== '') {
|
74
|
+
url += '&key='+GMapz.APIKEY;
|
75
|
+
}
|
76
|
+
script.type = 'text/javascript';
|
77
|
+
script.src = url;
|
78
|
+
document.body.appendChild(script);
|
79
|
+
}
|
80
|
+
|
81
|
+
// Override from outside
|
82
|
+
function onGoogleMapsReady() {
|
83
|
+
// Do nothing
|
84
|
+
}
|
85
|
+
|
86
|
+
function onApiReady() {
|
87
|
+
data.map_api_ready = true;
|
88
|
+
|
89
|
+
if (this.debug) console.info('google.maps api loaded -> call gmapz.maps / autocomplete instances');
|
90
|
+
|
91
|
+
GMapz.onGoogleMapsReady();
|
92
|
+
|
93
|
+
// Prepare custom if any pins (we need google.maps)
|
94
|
+
if(GMapz.pins) {
|
95
|
+
GMapz.createCustomPins();
|
96
|
+
}
|
97
|
+
|
98
|
+
// Alert each map instance
|
99
|
+
$('[data-gmapz], [data-gmapz-autocomplete]').each(function(idx, el) {
|
100
|
+
$(el)[0].gmapz.instanceReady();
|
101
|
+
});
|
102
|
+
}
|
103
|
+
|
104
|
+
// Pin creation
|
105
|
+
function createCustomPins() {
|
106
|
+
var _p = $.extend(true, {}, this.pins); // Clone
|
107
|
+
this.pins = {}; // Erase
|
108
|
+
|
109
|
+
// Create pins
|
110
|
+
for (var key in _p) {
|
111
|
+
// Pins
|
112
|
+
if (_p.hasOwnProperty(key) && _p[key].pin.img) {
|
113
|
+
this.pins[key] = {};
|
114
|
+
this.pins[key].pin = new google.maps.MarkerImage(_p[key].pin.img,
|
115
|
+
// width / height
|
116
|
+
new google.maps.Size(_p[key].pin.size[0], _p[key].pin.size[1]),
|
117
|
+
// origin
|
118
|
+
new google.maps.Point(0,0),
|
119
|
+
// anchor point
|
120
|
+
new google.maps.Point(_p[key].pin.anchor[0], _p[key].pin.anchor[1])
|
121
|
+
);
|
122
|
+
}
|
123
|
+
}
|
124
|
+
}
|
125
|
+
|
126
|
+
// Given a center (cx, cy) and a corner (rx, ry)
|
127
|
+
// Returns the opposite corner of rectangle
|
128
|
+
function getOppositeCorner(cx, cy, rx, ry) {
|
129
|
+
var
|
130
|
+
x = cx + (cx - rx),
|
131
|
+
y = cy + (cy - ry);
|
132
|
+
return new google.maps.LatLng(x,y);
|
133
|
+
}
|
134
|
+
|
135
|
+
// Converts google.maps bounds object into "NW_lat, NW_lng, SE_lat, SE_lng" sting
|
136
|
+
function serializeBounds (bounds) {
|
137
|
+
var
|
138
|
+
sw = bounds.getSouthWest(),
|
139
|
+
ne = bounds.getNorthEast();
|
140
|
+
return [sw.lat(), sw.lng(), ne.lat(), ne.lng()].join(',');
|
141
|
+
}
|
142
|
+
|
143
|
+
// Initialize buttons to control the map(s)
|
144
|
+
// Buttons may have data-gmapz-target attribute, read the doc
|
145
|
+
// For functionallity
|
146
|
+
function attachActionButtons () {
|
147
|
+
// Generic elements but select / <a>
|
148
|
+
$(document).on('click', '*[data-gmapz-target]:not(select)', function (e) {
|
149
|
+
e.preventDefault();
|
150
|
+
var
|
151
|
+
target = $(this).attr('data-gmapz-target');
|
152
|
+
// Get all data attributes ans send them to gmapz handler and the element
|
153
|
+
$('[data-gmapz="'+target+'"]')[0].gmapz.btnAction($(this).data(), $(this));
|
154
|
+
}).on('change', 'select[data-gmapz-target]', function (e) {
|
155
|
+
// <select>
|
156
|
+
var
|
157
|
+
target = $(this).attr('data-gmapz-target');
|
158
|
+
$('[data-gmapz="'+target+'"]')[0].gmapz.btnAction($(this).find('option:selected').data());
|
159
|
+
});
|
160
|
+
|
161
|
+
}
|
162
|
+
|
163
|
+
//
|
164
|
+
// Public methods / properties
|
165
|
+
//
|
166
|
+
window.GMapz = {
|
167
|
+
onGoogleMapsReady: onGoogleMapsReady,
|
168
|
+
attachActionButtons: attachActionButtons,
|
169
|
+
getOppositeCorner: getOppositeCorner,
|
170
|
+
createCustomPins: createCustomPins,
|
171
|
+
onApiReady: onApiReady,
|
172
|
+
requestAPI: requestAPI,
|
173
|
+
getUniqueId: getUniqueId,
|
174
|
+
debug: debug,
|
175
|
+
data: data,
|
176
|
+
pins: pins // Custom pins
|
177
|
+
};
|
178
|
+
|
179
|
+
}(jQuery));
|
@@ -0,0 +1,474 @@
|
|
1
|
+
// You can include this data wherever you want
|
2
|
+
|
3
|
+
// Data
|
4
|
+
spain_locs = {
|
5
|
+
1: { // LOCATION IDX MUST BE UNIQUE
|
6
|
+
lat: 42.5868,
|
7
|
+
lng: 0.9745,
|
8
|
+
iw: 'idx:1 <br>Aigüestortes i Estany de Sant Maurici.<br>Lérida, Cataluña<br><a href="http://es.wikipedia.org/wiki/Parque_nacional_de_Aig%C3%BCestortes_y_Lago_de_San_Mauricio">Wikipedia</a>'
|
9
|
+
},
|
10
|
+
289: {
|
11
|
+
lat: 39.158333,
|
12
|
+
lng: 2.966667,
|
13
|
+
iw: 'idx: 289<br>Archipiélago de Cabrera<br>Islas Baleares<a href="http://es.wikipedia.org/wiki/Parque_nacional_mar%C3%ADtimo-terrestre_del_Archipi%C3%A9lago_de_Cabrera">Wikipedia</a>'
|
14
|
+
},
|
15
|
+
38: {
|
16
|
+
lat: 39.4261,
|
17
|
+
lng: -4.52528,
|
18
|
+
iw: 'idx: 38<br>Parque nacional de Cabañeros<br>Toledo, Ciudad Real<br><a href="http://www.parquenacionalcabaneros.com/">Página web oficial</a>'
|
19
|
+
},
|
20
|
+
2: {
|
21
|
+
pin: 'blue',
|
22
|
+
lat: 28.7166,
|
23
|
+
lng: -17.8833,
|
24
|
+
iw: 'idx: 2<br>Caldera de Taburiente<br>Islas Canarias<br><a href="http://es.wikipedia.org/wiki/Parque_nacional_de_la_Caldera_de_Taburiente">Wikipedia</a>'
|
25
|
+
},
|
26
|
+
3: {
|
27
|
+
lat: 37.0003,
|
28
|
+
lng: -6.4166,
|
29
|
+
iw: 'idx: 3<br>Doñana<br>Huelva<br><a href="http://es.wikipedia.org/wiki/Parque_nacional_y_natural_de_Do%C3%B1ana">Wikipedia</a>'
|
30
|
+
},
|
31
|
+
'garajonay': {
|
32
|
+
pin: 'blue',
|
33
|
+
lat: 28.1262,
|
34
|
+
lng: -17.2372,
|
35
|
+
iw: 'idx: garajonay<br>Garajonay<br>Islas Canarias<br><a href="http://es.wikipedia.org/wiki/Parque_nacional_de_Garajonay">Wikipedia</a>'
|
36
|
+
},
|
37
|
+
5: {
|
38
|
+
pin: 'orange',
|
39
|
+
lat: 42.3805,
|
40
|
+
lng: -8.9333,
|
41
|
+
iw: 'idx: 5<br>Parque nacional de las Islas Atlánticas de Galicia<br>Galicia<br><a href="http://es.wikipedia.org/wiki/Parque_nacional_de_las_Islas_Atl%C3%A1nticas_de_Galicia">Wikipedia</a>'
|
42
|
+
},
|
43
|
+
6: {
|
44
|
+
lat: 39.8408,
|
45
|
+
lng: -6.03,
|
46
|
+
iw: 'idx: 6<br>Parque nacional de Monfragüe<br>Extremadura<br><a href="http://es.wikipedia.org/wiki/Parque_nacional_de_Monfrag%C3%BCe">Wikipedia</a>'
|
47
|
+
},
|
48
|
+
7: {
|
49
|
+
lat: 42.6716,
|
50
|
+
lng: 0.0555,
|
51
|
+
iw: 'idx: 7<br>Ordesa y Monte Perdido<br>Huesca<br><a href="http://es.wikipedia.org/wiki/Parque_nacional_de_Ordesa_y_Monte_Perdido">Wikipedia</a>'
|
52
|
+
},
|
53
|
+
'picos_de_europa': {
|
54
|
+
pin: 'orange',
|
55
|
+
lat: 43.1833,
|
56
|
+
lng: -4.8333,
|
57
|
+
iw: 'idx: picos_de_europa<br>Picos de Europa<br>Asturias<br><a href="http://es.wikipedia.org/wiki/Picos_de_Europa">Wikipedia</a>'
|
58
|
+
},
|
59
|
+
9: {
|
60
|
+
lat: 37.2,
|
61
|
+
lng: -3.25,
|
62
|
+
iw: 'idx: 9<br>Sierra Nevada<br>Granada<br><a href="http://es.wikipedia.org/wiki/Parque_nacional_de_Sierra_Nevada_(Espa%C3%B1a)">Wikipedia</a>'
|
63
|
+
},
|
64
|
+
10: {
|
65
|
+
lat: 39.1297,
|
66
|
+
lng: -3.7202,
|
67
|
+
iw: 'idx: 10<br>Tablas de Daimiel<br>Ciudad Real<br><a href="http://es.wikipedia.org/wiki/Parque_nacional_de_las_Tablas_de_Daimiel">Wikipedia</a>'
|
68
|
+
},
|
69
|
+
12: {
|
70
|
+
pin: 'blue',
|
71
|
+
lat: 29.0111,
|
72
|
+
lng: -13.7333,
|
73
|
+
iw: 'idx: 12<br>Parque nacional de Timanfaya<br>Islas Canarias<br><a href="http://es.wikipedia.org/wiki/Parque_nacional_de_Timanfaya">Wikipedia</a>'
|
74
|
+
},
|
75
|
+
'teide': {
|
76
|
+
pin: 'blue',
|
77
|
+
lat: 28.2713,
|
78
|
+
lng: -16.6436,
|
79
|
+
iw: 'idx: teide<br>Parque nacional del Teide<br>Islas Canarias<br><a href="http://es.wikipedia.org/wiki/Parque_nacional_del_Teide">Wikipedia</a>',
|
80
|
+
visible: false
|
81
|
+
}
|
82
|
+
};
|
83
|
+
|
84
|
+
// Data
|
85
|
+
var morocco = {
|
86
|
+
'FEZ' : { // ITEM IDX MUST BE UNIQUE
|
87
|
+
pin: 'green',
|
88
|
+
lat: 34.033884,
|
89
|
+
lng: -5.000206,
|
90
|
+
iw: 'idx: 667<br>Fez en Marruecos',
|
91
|
+
draggable: true
|
92
|
+
},
|
93
|
+
'ORAN' : {
|
94
|
+
pin: 'green',
|
95
|
+
lat: 35.698013,
|
96
|
+
lng: -0.632942,
|
97
|
+
iw: 'idx: 668<br>Orán',
|
98
|
+
draggable: true
|
99
|
+
},
|
100
|
+
12: { // Updated location on pourposse
|
101
|
+
pin: 'green',
|
102
|
+
lat: 43.257206,
|
103
|
+
lng: -2.923763,
|
104
|
+
draggable: true
|
105
|
+
},
|
106
|
+
};
|
107
|
+
|
108
|
+
// Update
|
109
|
+
update = {
|
110
|
+
289: {
|
111
|
+
lat: 42.1541,
|
112
|
+
lng: 9.0884,
|
113
|
+
iw: 'idx: 289<br><b>Ahora está en Córcega ;)</b><br>y el usuario puede <em>arrastrarlo</em>',
|
114
|
+
draggable: true
|
115
|
+
}
|
116
|
+
};
|
117
|
+
|
118
|
+
// France main cities
|
119
|
+
france_cities = {
|
120
|
+
paris: {
|
121
|
+
lat: 48.860,
|
122
|
+
lng: 2.340,
|
123
|
+
iw: 'Paris 2107700'
|
124
|
+
},
|
125
|
+
marseille: {
|
126
|
+
lat: 43.310,
|
127
|
+
lng: 5.370,
|
128
|
+
iw: 'Marseille, population: 826300'
|
129
|
+
},
|
130
|
+
lyon: {
|
131
|
+
lat: 45.760,
|
132
|
+
lng: 4.830,
|
133
|
+
iw: 'Lyon, population: 443600'
|
134
|
+
},
|
135
|
+
toulouse: {
|
136
|
+
lat: 43.620,
|
137
|
+
lng: 1.450,
|
138
|
+
iw: 'Toulouse, population: 417400'
|
139
|
+
},
|
140
|
+
Nice: {
|
141
|
+
lat: 43.700,
|
142
|
+
lng: 7.270,
|
143
|
+
iw: 'Nice, population: 329800'
|
144
|
+
},
|
145
|
+
Nantes: {
|
146
|
+
lat: 47.230,
|
147
|
+
lng: -1.570,
|
148
|
+
iw: 'Nantes, population: 285700'
|
149
|
+
},
|
150
|
+
Strasbourg: {
|
151
|
+
lat: 48.580,
|
152
|
+
lng: 7.760,
|
153
|
+
iw: 'Strasbourg, population: 274700'
|
154
|
+
},
|
155
|
+
Montpellier: {
|
156
|
+
lat: 43.610,
|
157
|
+
lng: 3.870,
|
158
|
+
iw: 'Montpellier, population: 231900'
|
159
|
+
},
|
160
|
+
Bordeaux: {
|
161
|
+
lat: 44.840,
|
162
|
+
lng: -0.580,
|
163
|
+
iw: 'Bordeaux, population: 217400'
|
164
|
+
},
|
165
|
+
rennes: {
|
166
|
+
lat: 48.110,
|
167
|
+
lng: -1.680,
|
168
|
+
iw: 'Rennes, population: 214200'
|
169
|
+
},
|
170
|
+
le_havre: {
|
171
|
+
lat: 49.500,
|
172
|
+
lng: 0.120,
|
173
|
+
iw: 'Le havre, population: 189000'
|
174
|
+
},
|
175
|
+
reims: {
|
176
|
+
lat: 49.250,
|
177
|
+
lng: 4.030,
|
178
|
+
iw: 'Reims, population: 183900'
|
179
|
+
},
|
180
|
+
lille: {
|
181
|
+
lat: 50.640,
|
182
|
+
lng: 3.070,
|
183
|
+
iw: 'Lille, population: 180100'
|
184
|
+
},
|
185
|
+
saint_etienne: {
|
186
|
+
lat: 45.430,
|
187
|
+
lng: 4.390,
|
188
|
+
iw: 'Saint-etienne, population: 168600'
|
189
|
+
},
|
190
|
+
toulon: {
|
191
|
+
lat: 43.130,
|
192
|
+
lng: 5.920,
|
193
|
+
iw: 'Toulon, population: 161600'
|
194
|
+
},
|
195
|
+
grenoble: {
|
196
|
+
lat: 45.190,
|
197
|
+
lng: 5.720,
|
198
|
+
iw: 'Grenoble, population: 156200'
|
199
|
+
},
|
200
|
+
angers: {
|
201
|
+
lat: 47.480,
|
202
|
+
lng: -0.540,
|
203
|
+
iw: 'Angers, population: 153800'
|
204
|
+
},
|
205
|
+
brest: {
|
206
|
+
lat: 48.390,
|
207
|
+
lng: -4.500,
|
208
|
+
iw: 'Brest, population: 152000'
|
209
|
+
},
|
210
|
+
le_mans: {
|
211
|
+
lat: 48.000,
|
212
|
+
lng: 0.200,
|
213
|
+
iw: 'Le mans, population: 149300'
|
214
|
+
},
|
215
|
+
dijon: {
|
216
|
+
lat: 47.330,
|
217
|
+
lng: 5.030,
|
218
|
+
iw: 'Dijon, population: 146400'
|
219
|
+
},
|
220
|
+
aix_en_provence: {
|
221
|
+
lat: 43.530,
|
222
|
+
lng: 5.440,
|
223
|
+
iw: 'Aix-en-provence, population: 139000'
|
224
|
+
},
|
225
|
+
clermont_ferrand: {
|
226
|
+
lat: 45.780,
|
227
|
+
lng: 3.080,
|
228
|
+
iw: 'Clermont-ferrand, population: 137300'
|
229
|
+
},
|
230
|
+
nimes: {
|
231
|
+
lat: 43.840,
|
232
|
+
lng: 4.350,
|
233
|
+
iw: 'Nimes, population: 137200'
|
234
|
+
},
|
235
|
+
amiens: {
|
236
|
+
lat: 49.900,
|
237
|
+
lng: 2.300,
|
238
|
+
iw: 'Amiens, population: 135800'
|
239
|
+
},
|
240
|
+
tours: {
|
241
|
+
lat: 47.380,
|
242
|
+
lng: 0.690,
|
243
|
+
iw: 'Tours, population: 133700'
|
244
|
+
},
|
245
|
+
limoges: {
|
246
|
+
lat: 45.830,
|
247
|
+
lng: 1.250,
|
248
|
+
iw: 'Limoges, population: 131900'
|
249
|
+
},
|
250
|
+
metz: {
|
251
|
+
lat: 49.120,
|
252
|
+
lng: 6.180,
|
253
|
+
iw: 'Metz, population: 125300'
|
254
|
+
},
|
255
|
+
villeurbanne: {
|
256
|
+
lat: 45.770,
|
257
|
+
lng: 4.880,
|
258
|
+
iw: 'Villeurbanne, population: 121800'
|
259
|
+
},
|
260
|
+
besancon: {
|
261
|
+
lat: 47.240,
|
262
|
+
lng: 6.020,
|
263
|
+
iw: 'Besancon, population: 118300'
|
264
|
+
},
|
265
|
+
caen: {
|
266
|
+
lat: 49.190,
|
267
|
+
lng: -0.360,
|
268
|
+
iw: 'Caen, population: 116800'
|
269
|
+
},
|
270
|
+
orleans: {
|
271
|
+
lat: 47.900,
|
272
|
+
lng: 1.900,
|
273
|
+
iw: 'Orleans, population: 112200'
|
274
|
+
},
|
275
|
+
mulhouse: {
|
276
|
+
lat: 47.760,
|
277
|
+
lng: 7.340,
|
278
|
+
iw: 'Mulhouse, population: 111500'
|
279
|
+
},
|
280
|
+
perpignan: {
|
281
|
+
lat: 42.700,
|
282
|
+
lng: 2.890,
|
283
|
+
iw: 'Perpignan, population: 111400'
|
284
|
+
},
|
285
|
+
boulogne_billancourt: {
|
286
|
+
lat: 48.830,
|
287
|
+
lng: 2.240,
|
288
|
+
iw: 'Boulogne-billancourt, population: 108500'
|
289
|
+
},
|
290
|
+
rouen: {
|
291
|
+
lat: 49.440,
|
292
|
+
lng: 1.080,
|
293
|
+
iw: 'Rouen, population: 105100'
|
294
|
+
},
|
295
|
+
nancy: {
|
296
|
+
lat: 48.690,
|
297
|
+
lng: 6.170,
|
298
|
+
iw: 'Nancy, population: 103100'
|
299
|
+
},
|
300
|
+
roubaix: {
|
301
|
+
lat: 50.690,
|
302
|
+
lng: 3.170,
|
303
|
+
iw: 'Roubaix, population: 95800'
|
304
|
+
},
|
305
|
+
tourcoing: {
|
306
|
+
lat: 50.720,
|
307
|
+
lng: 3.160,
|
308
|
+
iw: 'Tourcoing, population: 92400'
|
309
|
+
},
|
310
|
+
argenteuil: {
|
311
|
+
lat: 48.940,
|
312
|
+
lng: 2.240,
|
313
|
+
iw: 'Argenteuil, population: 90300'
|
314
|
+
},
|
315
|
+
avignon: {
|
316
|
+
lat: 43.960,
|
317
|
+
lng: 4.810,
|
318
|
+
iw: 'Avignon, population: 87100'
|
319
|
+
},
|
320
|
+
montreuil: {
|
321
|
+
lat: 48.860,
|
322
|
+
lng: 2.430,
|
323
|
+
iw: 'Montreuil, population: 86600'
|
324
|
+
},
|
325
|
+
nanterre: {
|
326
|
+
lat: 48.900,
|
327
|
+
lng: 2.200,
|
328
|
+
iw: 'Nanterre, population: 86100'
|
329
|
+
},
|
330
|
+
poitiers: {
|
331
|
+
lat: 46.580,
|
332
|
+
lng: 0.340,
|
333
|
+
iw: 'Poitiers, population: 85900'
|
334
|
+
},
|
335
|
+
saint_denis: {
|
336
|
+
lat: 48.940,
|
337
|
+
lng: 2.360,
|
338
|
+
iw: 'Saint-denis, population: 82000'
|
339
|
+
},
|
340
|
+
versailles: {
|
341
|
+
lat: 48.810,
|
342
|
+
lng: 2.140,
|
343
|
+
iw: 'Versailles, population: 81200'
|
344
|
+
},
|
345
|
+
creteil: {
|
346
|
+
lat: 48.790,
|
347
|
+
lng: 2.450,
|
348
|
+
iw: 'Creteil, population: 79700'
|
349
|
+
},
|
350
|
+
pau: {
|
351
|
+
lat: 43.300,
|
352
|
+
lng: -0.390,
|
353
|
+
iw: 'Pau, population: 79600'
|
354
|
+
},
|
355
|
+
la_rochelle: {
|
356
|
+
lat: 46.170,
|
357
|
+
lng: -1.180,
|
358
|
+
iw: 'La rochelle, population: 79400'
|
359
|
+
},
|
360
|
+
colombes: {
|
361
|
+
lat: 48.930,
|
362
|
+
lng: 2.250,
|
363
|
+
iw: 'Colombes, population: 78400'
|
364
|
+
},
|
365
|
+
asnieres_sur_seine: {
|
366
|
+
lat: 48.910,
|
367
|
+
lng: 2.290,
|
368
|
+
iw: 'Asnieres-sur-seine, population: 77400'
|
369
|
+
},
|
370
|
+
calais: {
|
371
|
+
lat: 50.950,
|
372
|
+
lng: 1.860,
|
373
|
+
iw: 'Calais, population: 77200'
|
374
|
+
},
|
375
|
+
aulnay_sous_bois: {
|
376
|
+
lat: 48.960,
|
377
|
+
lng: 2.490,
|
378
|
+
iw: 'Aulnay-sous-bois, population: 76500'
|
379
|
+
},
|
380
|
+
vitry_sur_seine: {
|
381
|
+
lat: 48.790,
|
382
|
+
lng: 2.390,
|
383
|
+
iw: 'Vitry-sur-seine, population: 76300'
|
384
|
+
},
|
385
|
+
rueil_malmaison: {
|
386
|
+
lat: 48.890,
|
387
|
+
lng: 2.170,
|
388
|
+
iw: 'Rueil-malmaison, population: 75000'
|
389
|
+
},
|
390
|
+
champigny_sur_marne: {
|
391
|
+
lat: 48.820,
|
392
|
+
lng: 2.510,
|
393
|
+
iw: 'Champigny-sur-marne, population: 72000'
|
394
|
+
},
|
395
|
+
beziers: {
|
396
|
+
lat: 43.350,
|
397
|
+
lng: 3.210,
|
398
|
+
iw: 'Beziers, population: 71200'
|
399
|
+
},
|
400
|
+
saint_maur_des_fosses: {
|
401
|
+
lat: 48.800,
|
402
|
+
lng: 2.490,
|
403
|
+
iw: 'Saint-maur-des-fosses, population: 70900'
|
404
|
+
},
|
405
|
+
dunkerque: {
|
406
|
+
lat: 51.040,
|
407
|
+
lng: 2.340,
|
408
|
+
iw: 'Dunkerque, population: 70400'
|
409
|
+
},
|
410
|
+
antibes: {
|
411
|
+
lat: 43.600,
|
412
|
+
lng: 7.120,
|
413
|
+
iw: 'Antibes, population: 70100'
|
414
|
+
},
|
415
|
+
saint_nazaire: {
|
416
|
+
lat: 47.28,
|
417
|
+
lng: -2.220,
|
418
|
+
iw: 'Saint-nazaire, population:70000'
|
419
|
+
}
|
420
|
+
};
|
421
|
+
|
422
|
+
// France main cities
|
423
|
+
italy_cities = {
|
424
|
+
roma: {
|
425
|
+
lat: 41.890,
|
426
|
+
lng: 12.500,
|
427
|
+
iw: 'Roma'
|
428
|
+
},
|
429
|
+
milano: {
|
430
|
+
lat: 45.480,
|
431
|
+
lng: 9.190,
|
432
|
+
iw: 'Milano'
|
433
|
+
},
|
434
|
+
napoli: {
|
435
|
+
lat: 40.850,
|
436
|
+
lng: 14.270,
|
437
|
+
iw: 'Napoli'
|
438
|
+
},
|
439
|
+
torino: {
|
440
|
+
lat: 45.080,
|
441
|
+
lng: 7.680,
|
442
|
+
iw: 'Torino'
|
443
|
+
},
|
444
|
+
palermo: {
|
445
|
+
lat: 38.120,
|
446
|
+
lng: 13.360,
|
447
|
+
iw: 'Palermo'
|
448
|
+
},
|
449
|
+
genova: {
|
450
|
+
lat: 44.420,
|
451
|
+
lng: 8.930,
|
452
|
+
iw: 'Genova'
|
453
|
+
},
|
454
|
+
bologna: {
|
455
|
+
lat: 44.500,
|
456
|
+
lng: 11.340,
|
457
|
+
iw: 'Bologna'
|
458
|
+
},
|
459
|
+
firenze: {
|
460
|
+
lat: 43.780,
|
461
|
+
lng: 11.240,
|
462
|
+
iw: 'Firenze'
|
463
|
+
},
|
464
|
+
catania: {
|
465
|
+
lat: 37.500,
|
466
|
+
lng: 15.080,
|
467
|
+
iw: 'Catania'
|
468
|
+
},
|
469
|
+
bari: {
|
470
|
+
lat: 41.120,
|
471
|
+
lng: 16.870,
|
472
|
+
iw: 'Bari'
|
473
|
+
}
|
474
|
+
};
|