提交 | 用户 | 时间
|
58d006
|
1 |
GMaps.js - A Javascript library that simplifies your life |
A |
2 |
========================================================= |
|
3 |
|
|
4 |
GMaps.js allows you to use the potential of Google Maps in a simple way. No more extensive documentation or large amount of code. |
|
5 |
|
|
6 |
Visit the examples in [hpneo.github.com/gmaps](http://hpneo.github.com/gmaps/) |
|
7 |
|
|
8 |
Build |
|
9 |
------ |
|
10 |
|
|
11 |
If you would like to build gmaps from source run the following at the terminal: |
|
12 |
|
|
13 |
```sh |
|
14 |
git clone https://github.com/HPNeo/gmaps.git |
|
15 |
cd gmaps |
|
16 |
npm install |
|
17 |
grunt |
|
18 |
``` |
|
19 |
|
|
20 |
Changelog |
|
21 |
--------- |
|
22 |
|
|
23 |
0.4.8 |
|
24 |
----------------------- |
|
25 |
* Fix getRoutes |
|
26 |
|
|
27 |
0.4.7 |
|
28 |
----------------------- |
|
29 |
* Add callback for failure in getRoutes |
|
30 |
* Update marker clusterer after remove marker |
|
31 |
* Add support for string arrays to arrayToLatLng |
|
32 |
|
|
33 |
0.4.6 |
|
34 |
----------------------- |
|
35 |
* Allow initialising GMaps without new |
|
36 |
* Added styled map support for static maps |
|
37 |
* Fixed name display for styled maps |
|
38 |
* Allow no zoom for static map request |
|
39 |
|
|
40 |
0.4.5 |
|
41 |
----------------------- |
|
42 |
* Fix IE8 bug using array_map |
|
43 |
* Add Grunt and Bower support |
|
44 |
|
|
45 |
0.4.4 |
|
46 |
----------------------- |
|
47 |
* Fix buildContextMenu reference in addMarker |
|
48 |
|
|
49 |
0.4.3 |
|
50 |
----------------------- |
|
51 |
* Fix removePolylines and removePolygons |
|
52 |
|
|
53 |
0.4.2 |
|
54 |
----------------------- |
|
55 |
* Fix drawSteppedRoute |
|
56 |
|
|
57 |
0.4.1 |
|
58 |
----------------------- |
|
59 |
* Fix fitZoom |
|
60 |
|
|
61 |
0.4.0 |
|
62 |
----------------------- |
|
63 |
* Split gmaps.js in modules |
|
64 |
|
|
65 |
0.3.5 |
|
66 |
----------------------- |
|
67 |
* Enable new Google Maps style |
|
68 |
|
|
69 |
0.3.4 |
|
70 |
----------------------- |
|
71 |
* Add support for context menu in multiple maps |
|
72 |
|
|
73 |
0.3.3 |
|
74 |
----------------------- |
|
75 |
* Fix destination as address in getRoutes |
|
76 |
|
|
77 |
0.3.2 |
|
78 |
----------------------- |
|
79 |
* Support for removing Fusion Tables and GeoRSS/KML layers with removeLayer |
|
80 |
|
|
81 |
0.3.1 |
|
82 |
----------------------- |
|
83 |
* Improve event binding at adding markers, polylines or polygons |
|
84 |
|
|
85 |
0.3 |
|
86 |
----------------------- |
|
87 |
* Add native events to google.maps objects and custom events to GMaps maps |
|
88 |
* Check for Google Maps library and defined element when initialize |
|
89 |
* Allow route origins to be a string or array |
|
90 |
|
|
91 |
0.2.31 |
|
92 |
----------------------- |
|
93 |
* Fix context menu position bug |
|
94 |
|
|
95 |
0.2.30 |
|
96 |
----------------------- |
|
97 |
* New feature: StreetView Panoramas |
|
98 |
|
|
99 |
0.2.29 |
|
100 |
----------------------- |
|
101 |
* New methods: removePolyline and removePolygon |
|
102 |
* Tests for Styled MapTypes |
|
103 |
|
|
104 |
0.2.28 |
|
105 |
----------------------- |
|
106 |
* Test suite |
|
107 |
* Fix double event firing bug |
|
108 |
|
|
109 |
0.2.27 |
|
110 |
----------------------- |
|
111 |
* Allow create context menus for markers |
|
112 |
|
|
113 |
0.2.26 |
|
114 |
----------------------- |
|
115 |
* Fix bug in getElevations |
|
116 |
* Rename fitBounds to fitLatLngBounds |
|
117 |
|
|
118 |
0.2.25 |
|
119 |
----------------------- |
|
120 |
* Support for GeoJSON in drawPolygon |
|
121 |
* Use 'complete' instead of 'always' in GMaps.geolocate |
|
122 |
|
|
123 |
0.2.24 |
|
124 |
----------------------- |
|
125 |
* New feature: **Overlay Map Types** |
|
126 |
|
|
127 |
0.2.23 |
|
128 |
----------------------- |
|
129 |
* Add full support to google.maps.PolylineOptions |
|
130 |
* New method: removeMarker |
|
131 |
|
|
132 |
0.2.22 |
|
133 |
----------------------- |
|
134 |
* New feature: **Map Types** |
|
135 |
|
|
136 |
0.2.21 |
|
137 |
----------------------- |
|
138 |
* Support to add google.maps.Marker objects in addMarker and addMarkers methods. |
|
139 |
|
|
140 |
0.2.20 |
|
141 |
----------------------- |
|
142 |
* Add support for other HTML block elements instead "div" (like "section"). |
|
143 |
|
|
144 |
0.2.19 |
|
145 |
----------------------- |
|
146 |
* Use MarkerClusterer to group markers |
|
147 |
|
|
148 |
0.2.18 |
|
149 |
----------------------- |
|
150 |
* Check if GMaps is defined before load extensions |
|
151 |
|
|
152 |
0.2.17 |
|
153 |
----------------------- |
|
154 |
* Fix bug with disableDefaultUI option in constructor |
|
155 |
|
|
156 |
0.2.16 |
|
157 |
----------------------- |
|
158 |
* Fix another bug in createMarker |
|
159 |
|
|
160 |
0.2.15 |
|
161 |
----------------------- |
|
162 |
* Fix bug in createMarker |
|
163 |
|
|
164 |
0.2.14 |
|
165 |
----------------------- |
|
166 |
* Adding IDs, classes and innerHTML to createControl. (**Note**: Use 'content' instead 'text' in createControl) |
|
167 |
|
|
168 |
0.2.13 |
|
169 |
----------------------- |
|
170 |
* Add support for Places library in addLayer |
|
171 |
|
|
172 |
0.2.12 |
|
173 |
----------------------- |
|
174 |
* Fix map events without MouseEvent object |
|
175 |
* Fix bug in drawCircle and drawRectangle |
|
176 |
* Fix bug in zoomIn and zoomOut |
|
177 |
* New methods: removePolygon and removePolygons |
|
178 |
|
|
179 |
0.2.11 |
|
180 |
----------------------- |
|
181 |
* Add support to Panoramio in addLayer |
|
182 |
|
|
183 |
0.2.10 |
|
184 |
----------------------- |
|
185 |
* New method: toImage |
|
186 |
|
|
187 |
0.2.9 |
|
188 |
----------------------- |
|
189 |
* Extend the drawSteppedRoute and travelRoute functions |
|
190 |
|
|
191 |
0.2.8 |
|
192 |
----------------------- |
|
193 |
* New feature: **Layers** |
|
194 |
|
|
195 |
0.2.7 |
|
196 |
----------------------- |
|
197 |
* New method: removeRoutes |
|
198 |
* Access all native methods of google.maps.Map class |
|
199 |
|
|
200 |
0.2.6 |
|
201 |
----------------------- |
|
202 |
* Support for multiple overlays |
|
203 |
|
|
204 |
0.2.5 |
|
205 |
----------------------- |
|
206 |
* Add support to all marker events |
|
207 |
* Add suport for animations at show and remove overlays |
|
208 |
|
|
209 |
0.2.4.1 |
|
210 |
----------------------- |
|
211 |
* Create GMaps class only when Google Maps API is loaded |
|
212 |
|
|
213 |
0.2.4 |
|
214 |
----------------------- |
|
215 |
* New feature: **Elevation service** |
|
216 |
|
|
217 |
0.2.3 |
|
218 |
----------------------- |
|
219 |
* New method: getZoom |
|
220 |
|
|
221 |
0.2.2 |
|
222 |
----------------------- |
|
223 |
* Minor improvements to support Backbone.js |
|
224 |
* Fix controls position |
|
225 |
|
|
226 |
0.2.1 |
|
227 |
----------------------- |
|
228 |
* More default values in GMaps constructor. |
|
229 |
|
|
230 |
0.2 |
|
231 |
----------------------- |
|
232 |
* Remove jQuery dependency. |
|
233 |
|
|
234 |
0.1.12.5 |
|
235 |
----------------------- |
|
236 |
* New method "removePolylines" and alias "cleanRoute" |
|
237 |
|
|
238 |
0.1.12.4 |
|
239 |
----------------------- |
|
240 |
* New methods: fitZoom and fitBounds |
|
241 |
|
|
242 |
0.1.12.3 |
|
243 |
----------------------- |
|
244 |
* New method: refresh |
|
245 |
|
|
246 |
0.1.12.2 |
|
247 |
----------------------- |
|
248 |
* New options in GMaps constructor: width and height |
|
249 |
|
|
250 |
0.1.12.1 |
|
251 |
----------------------- |
|
252 |
* New methods: loadFromFusionTables and loadFromKML |
|
253 |
|
|
254 |
0.1.12 |
|
255 |
----------------------- |
|
256 |
* New feature: **KML and GeoRSS** |
|
257 |
* Fix bug in getFromFusionTables |
|
258 |
|
|
259 |
0.1.11 |
|
260 |
----------------------- |
|
261 |
* New feature: **Fusion Tables** |
|
262 |
|
|
263 |
0.1.10 |
|
264 |
----------------------- |
|
265 |
* New feature: **Custom controls** |
|
266 |
|
|
267 |
0.1.9 |
|
268 |
----------------------- |
|
269 |
* New feature: **Static maps** |
|
270 |
|
|
271 |
0.1.8.10 |
|
272 |
----------------------- |
|
273 |
* Better GMaps.Route methods |
|
274 |
|
|
275 |
0.1.8.9 |
|
276 |
----------------------- |
|
277 |
* Fix typo in Polyline events |
|
278 |
* Add InfoWindow events |
|
279 |
|
|
280 |
0.1.8.8 |
|
281 |
----------------------- |
|
282 |
* Add Polyline events |
|
283 |
|
|
284 |
0.1.8.7 |
|
285 |
----------------------- |
|
286 |
* Add drag and dragstart events to Marker |
|
287 |
|
|
288 |
0.1.8.6 |
|
289 |
----------------------- |
|
290 |
* Add avoidHighways, avoidTolls, optimizeWaypoints, unitSystem and waypoints options in getRoutes |
|
291 |
* New method: createMarker |
|
292 |
|
|
293 |
0.1.8.5 |
|
294 |
----------------------- |
|
295 |
* geolocation and geocode methods are static now (using them with GMaps.geolocation and GMaps.geocode) |
|
296 |
|
|
297 |
0.1.8.4 |
|
298 |
----------------------- |
|
299 |
* Fix typo in geocode method |
|
300 |
* Allow all MapOptions in constructor (see 'MapOptions' section in Google Maps API Reference) |
|
301 |
|
|
302 |
0.1.8.3 |
|
303 |
----------------------- |
|
304 |
* Add pane option ('floatPane', 'floatShadow', 'mapPane', 'overlayImage', 'overlayLayer', 'overlayMouseTarget', 'overlayShadow') in drawOverlay |
|
305 |
* New methods: removeOverlay and removeOverlays |
|
306 |
|
|
307 |
0.1.8.2 |
|
308 |
----------------------- |
|
309 |
* Change pane ('floatPane' to 'overlayLayer') in drawOverlay |
|
310 |
|
|
311 |
0.1.8.1 |
|
312 |
----------------------- |
|
313 |
* Fix bug in drawCircle |
|
314 |
|
|
315 |
0.1.8 |
|
316 |
----------------------- |
|
317 |
* New feature: **Overlays** |
|
318 |
* New method: drawCircle |
|
319 |
|
|
320 |
0.1.7.1 |
|
321 |
----------------------- |
|
322 |
* Bug fix: zoomIn/zoomOut can change zoom by argument |
|
323 |
* New method: setZoom |
|
324 |
|
|
325 |
0.1.7 |
|
326 |
----------------------- |
|
327 |
* New class: **GMaps.Route** |
|
328 |
|
|
329 |
0.1.6 |
|
330 |
----------------------- |
|
331 |
* New feature: **Geofence** (with markers) |
|
332 |
* New method: **drawPolygon** |
|
333 |
* Bug fix: Change reserved word in Context menu |
|
334 |
|
|
335 |
0.1.5 |
|
336 |
----------------------- |
|
337 |
* New feature: **Geocoding** |
|
338 |
* New method: **drawSteppedRoute** (similar to travelRoute) |
|
339 |
|
|
340 |
0.1.4 |
|
341 |
----------------------- |
|
342 |
* New events in **addMarker** |
|
343 |
* Add step_number property in **travelRoute** method |
|
344 |
|
|
345 |
0.1.3 |
|
346 |
----------------------- |
|
347 |
* New feature: **Context menu** (for map and marker only) |
|
348 |
* New method: **travelRoute** |
|
349 |
* Change setCenter to panTo in GMaps **setCenter** method |
|
350 |
* Save entire route data in routes array (instead saving only route path) |
|
351 |
* Context menu and Route example (using **travelRoute**) |
|
352 |
|
|
353 |
0.1.2 |
|
354 |
----------------------- |
|
355 |
* **drawPolyline** can accept both an array of LatLng objets or an array of coordinates |
|
356 |
* New methods: **getRoutes** and **drawRoute** |
|
357 |
* Route example |
|
358 |
|
|
359 |
0.1.1 |
|
360 |
----------------------- |
|
361 |
* Rename **drawRoute** method to **drawPolyline** (more accurate) |
|
362 |
* Marker example |
|
363 |
|
|
364 |
0.1 - Initial release |
|
365 |
----------------------- |
|
366 |
* Map events |
|
367 |
* Geolocation |
|
368 |
* Add Markers |
|
369 |
* Marker infoWindows |
|
370 |
* Draw routes and circles |
|
371 |
* Initial examples |
|
372 |
|
|
373 |
License |
|
374 |
--------- |
|
375 |
MIT License. Copyright 2012 Gustavo Leon. http://github.com/hpneo |
|
376 |
|
|
377 |
Permission is hereby granted, free of charge, to any |
|
378 |
person obtaining a copy of this software and associated |
|
379 |
documentation files (the "Software"), to deal in the |
|
380 |
Software without restriction, including without limitation |
|
381 |
the rights to use, copy, modify, merge, publish, |
|
382 |
distribute, sublicense, and/or sell copies of the |
|
383 |
Software, and to permit persons to whom the Software is |
|
384 |
furnished to do so, subject to the following conditions: |
|
385 |
|
|
386 |
The above copyright notice and this permission notice |
|
387 |
shall be included in all copies or substantial portions of |
|
388 |
the Software. |
|
389 |
|
|
390 |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY |
|
391 |
KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE |
|
392 |
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR |
|
393 |
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS |
|
394 |
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR |
|
395 |
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR |
|
396 |
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE |
|
397 |
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |