@inlog/inlog-maps 1.0.0 → 1.1.0-test

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (298) hide show
  1. package/DOCUMENTATION.md +1813 -0
  2. package/README.md +46 -591
  3. package/_bundles/inlog-maps.js +3 -0
  4. package/_bundles/inlog-maps.js.LICENSE.txt +20 -0
  5. package/_bundles/inlog-maps.js.map +1 -0
  6. package/_bundles/inlog-maps.min.js +3 -0
  7. package/_bundles/inlog-maps.min.js.LICENSE.txt +20 -0
  8. package/_bundles/inlog-maps.min.js.map +1 -0
  9. package/bower.json +23 -0
  10. package/lib/index.d.ts +46 -0
  11. package/lib/index.js +47 -0
  12. package/lib/index.js.map +1 -0
  13. package/lib/map.d.ts +519 -0
  14. package/lib/map.js +1137 -0
  15. package/lib/map.js.map +1 -0
  16. package/lib/models/apis/google/google-circles.d.ts +18 -0
  17. package/lib/models/apis/google/google-circles.js +134 -0
  18. package/lib/models/apis/google/google-circles.js.map +1 -0
  19. package/lib/models/apis/google/google-geojson.d.ts +9 -0
  20. package/lib/models/apis/google/google-geojson.js +73 -0
  21. package/lib/models/apis/google/google-geojson.js.map +1 -0
  22. package/lib/models/apis/google/google-map.d.ts +16 -0
  23. package/lib/models/apis/google/google-map.js +174 -0
  24. package/lib/models/apis/google/google-map.js.map +1 -0
  25. package/lib/models/apis/google/google-markers.d.ts +29 -0
  26. package/lib/models/apis/google/google-markers.js +325 -0
  27. package/lib/models/apis/google/google-markers.js.map +1 -0
  28. package/lib/models/apis/google/google-overlay.d.ts +11 -0
  29. package/lib/models/apis/google/google-overlay.js +102 -0
  30. package/lib/models/apis/google/google-overlay.js.map +1 -0
  31. package/lib/models/apis/google/google-polygons.d.ts +29 -0
  32. package/lib/models/apis/google/google-polygons.js +301 -0
  33. package/lib/models/apis/google/google-polygons.js.map +1 -0
  34. package/lib/models/apis/google/google-polylines.d.ts +55 -0
  35. package/lib/models/apis/google/google-polylines.js +707 -0
  36. package/lib/models/apis/google/google-polylines.js.map +1 -0
  37. package/lib/models/apis/google/google-popup.d.ts +10 -0
  38. package/lib/models/apis/google/google-popup.js +59 -0
  39. package/lib/models/apis/google/google-popup.js.map +1 -0
  40. package/lib/models/apis/googleMaps.d.ts +97 -0
  41. package/lib/models/apis/googleMaps.js +449 -0
  42. package/lib/models/apis/googleMaps.js.map +1 -0
  43. package/lib/models/apis/leaflet/leaflet-circle.d.ts +18 -0
  44. package/lib/models/apis/leaflet/leaflet-circle.js +163 -0
  45. package/lib/models/apis/leaflet/leaflet-circle.js.map +1 -0
  46. package/lib/models/apis/leaflet/leaflet-geojson.d.ts +9 -0
  47. package/lib/models/apis/leaflet/leaflet-geojson.js +73 -0
  48. package/lib/models/apis/leaflet/leaflet-geojson.js.map +1 -0
  49. package/lib/models/apis/leaflet/leaflet-map.d.ts +16 -0
  50. package/lib/models/apis/leaflet/leaflet-map.js +140 -0
  51. package/lib/models/apis/leaflet/leaflet-map.js.map +1 -0
  52. package/lib/models/apis/leaflet/leaflet-markers.d.ts +29 -0
  53. package/lib/models/apis/leaflet/leaflet-markers.js +294 -0
  54. package/lib/models/apis/leaflet/leaflet-markers.js.map +1 -0
  55. package/lib/models/apis/leaflet/leaflet-overlay.d.ts +10 -0
  56. package/lib/models/apis/leaflet/leaflet-overlay.js +35 -0
  57. package/lib/models/apis/leaflet/leaflet-overlay.js.map +1 -0
  58. package/lib/models/apis/leaflet/leaflet-polygons.d.ts +23 -0
  59. package/lib/models/apis/leaflet/leaflet-polygons.js +211 -0
  60. package/lib/models/apis/leaflet/leaflet-polygons.js.map +1 -0
  61. package/lib/models/apis/leaflet/leaflet-polylines.d.ts +55 -0
  62. package/lib/models/apis/leaflet/leaflet-polylines.js +721 -0
  63. package/lib/models/apis/leaflet/leaflet-polylines.js.map +1 -0
  64. package/lib/models/apis/leaflet/leaflet-popup.d.ts +11 -0
  65. package/lib/models/apis/leaflet/leaflet-popup.js +74 -0
  66. package/lib/models/apis/leaflet/leaflet-popup.js.map +1 -0
  67. package/lib/models/apis/leaflet.d.ts +99 -0
  68. package/lib/models/apis/leaflet.js +464 -0
  69. package/lib/models/apis/leaflet.js.map +1 -0
  70. package/lib/models/apis/mapFunctions.d.ts +85 -0
  71. package/lib/models/apis/mapFunctions.js +2 -0
  72. package/lib/models/apis/mapFunctions.js.map +1 -0
  73. package/lib/models/dto/event-type.d.ts +33 -0
  74. package/lib/models/dto/event-type.js +39 -0
  75. package/lib/models/dto/event-type.js.map +1 -0
  76. package/lib/models/dto/map-type.d.ts +4 -0
  77. package/lib/models/dto/map-type.js +6 -0
  78. package/lib/models/dto/map-type.js.map +1 -0
  79. package/lib/models/dto/polyline-type.d.ts +5 -0
  80. package/lib/models/dto/polyline-type.js +7 -0
  81. package/lib/models/dto/polyline-type.js.map +1 -0
  82. package/lib/models/features/circle/circle-alter-options.d.ts +12 -0
  83. package/lib/models/features/circle/circle-alter-options.js +14 -0
  84. package/lib/models/features/circle/circle-alter-options.js.map +1 -0
  85. package/lib/models/features/circle/circle-options.d.ts +15 -0
  86. package/lib/models/features/circle/circle-options.js +19 -0
  87. package/lib/models/features/circle/circle-options.js.map +1 -0
  88. package/lib/models/features/events/event-return.d.ts +4 -0
  89. package/lib/models/features/events/event-return.js +8 -0
  90. package/lib/models/features/events/event-return.js.map +1 -0
  91. package/lib/models/features/geojson/geojson-options.d.ts +5 -0
  92. package/lib/models/features/geojson/geojson-options.js +9 -0
  93. package/lib/models/features/geojson/geojson-options.js.map +1 -0
  94. package/lib/models/features/marker/circle-marker-options.d.ts +9 -0
  95. package/lib/models/features/marker/circle-marker-options.js +12 -0
  96. package/lib/models/features/marker/circle-marker-options.js.map +1 -0
  97. package/lib/models/features/marker/circle-marker-style.d.ts +8 -0
  98. package/lib/models/features/marker/circle-marker-style.js +12 -0
  99. package/lib/models/features/marker/circle-marker-style.js.map +1 -0
  100. package/lib/models/features/marker/marker-alter-options.d.ts +8 -0
  101. package/lib/models/features/marker/marker-alter-options.js +10 -0
  102. package/lib/models/features/marker/marker-alter-options.js.map +1 -0
  103. package/lib/models/features/marker/marker-icon.d.ts +6 -0
  104. package/lib/models/features/marker/marker-icon.js +10 -0
  105. package/lib/models/features/marker/marker-icon.js.map +1 -0
  106. package/lib/models/features/marker/marker-options.d.ts +11 -0
  107. package/lib/models/features/marker/marker-options.js +18 -0
  108. package/lib/models/features/marker/marker-options.js.map +1 -0
  109. package/lib/models/features/marker-clusterer/marker-clusterer-config.d.ts +6 -0
  110. package/lib/models/features/marker-clusterer/marker-clusterer-config.js +10 -0
  111. package/lib/models/features/marker-clusterer/marker-clusterer-config.js.map +1 -0
  112. package/lib/models/features/overlay/overlay-options.d.ts +11 -0
  113. package/lib/models/features/overlay/overlay-options.js +15 -0
  114. package/lib/models/features/overlay/overlay-options.js.map +1 -0
  115. package/lib/models/features/polygons/polygon-alter-options.d.ts +13 -0
  116. package/lib/models/features/polygons/polygon-alter-options.js +14 -0
  117. package/lib/models/features/polygons/polygon-alter-options.js.map +1 -0
  118. package/lib/models/features/polygons/polygon-options.d.ts +15 -0
  119. package/lib/models/features/polygons/polygon-options.js +19 -0
  120. package/lib/models/features/polygons/polygon-options.js.map +1 -0
  121. package/lib/models/features/polyline/navigations-options.d.ts +11 -0
  122. package/lib/models/features/polyline/navigations-options.js +16 -0
  123. package/lib/models/features/polyline/navigations-options.js.map +1 -0
  124. package/lib/models/features/polyline/polyline-options.d.ts +18 -0
  125. package/lib/models/features/polyline/polyline-options.js +20 -0
  126. package/lib/models/features/polyline/polyline-options.js.map +1 -0
  127. package/lib/models/features/popup/popup-options.d.ts +9 -0
  128. package/lib/models/features/popup/popup-options.js +13 -0
  129. package/lib/models/features/popup/popup-options.js.map +1 -0
  130. package/lib/utils/maps-api-loader.service.d.ts +14 -0
  131. package/lib/utils/maps-api-loader.service.js +89 -0
  132. package/lib/utils/maps-api-loader.service.js.map +1 -0
  133. package/lib/utils/url-builder.d.ts +20 -0
  134. package/lib/utils/url-builder.js +44 -0
  135. package/lib/utils/url-builder.js.map +1 -0
  136. package/lib-esm/index.d.ts +46 -0
  137. package/lib-esm/index.js +47 -0
  138. package/lib-esm/index.js.map +1 -0
  139. package/lib-esm/map.d.ts +519 -0
  140. package/lib-esm/map.js +1137 -0
  141. package/lib-esm/map.js.map +1 -0
  142. package/lib-esm/models/apis/google/google-circles.d.ts +18 -0
  143. package/lib-esm/models/apis/google/google-circles.js +134 -0
  144. package/lib-esm/models/apis/google/google-circles.js.map +1 -0
  145. package/lib-esm/models/apis/google/google-geojson.d.ts +9 -0
  146. package/lib-esm/models/apis/google/google-geojson.js +73 -0
  147. package/lib-esm/models/apis/google/google-geojson.js.map +1 -0
  148. package/lib-esm/models/apis/google/google-map.d.ts +16 -0
  149. package/lib-esm/models/apis/google/google-map.js +174 -0
  150. package/lib-esm/models/apis/google/google-map.js.map +1 -0
  151. package/lib-esm/models/apis/google/google-markers.d.ts +29 -0
  152. package/lib-esm/models/apis/google/google-markers.js +325 -0
  153. package/lib-esm/models/apis/google/google-markers.js.map +1 -0
  154. package/lib-esm/models/apis/google/google-overlay.d.ts +11 -0
  155. package/lib-esm/models/apis/google/google-overlay.js +102 -0
  156. package/lib-esm/models/apis/google/google-overlay.js.map +1 -0
  157. package/lib-esm/models/apis/google/google-polygons.d.ts +29 -0
  158. package/lib-esm/models/apis/google/google-polygons.js +301 -0
  159. package/lib-esm/models/apis/google/google-polygons.js.map +1 -0
  160. package/lib-esm/models/apis/google/google-polylines.d.ts +55 -0
  161. package/lib-esm/models/apis/google/google-polylines.js +707 -0
  162. package/lib-esm/models/apis/google/google-polylines.js.map +1 -0
  163. package/lib-esm/models/apis/google/google-popup.d.ts +10 -0
  164. package/lib-esm/models/apis/google/google-popup.js +59 -0
  165. package/lib-esm/models/apis/google/google-popup.js.map +1 -0
  166. package/lib-esm/models/apis/googleMaps.d.ts +97 -0
  167. package/lib-esm/models/apis/googleMaps.js +449 -0
  168. package/lib-esm/models/apis/googleMaps.js.map +1 -0
  169. package/lib-esm/models/apis/leaflet/leaflet-circle.d.ts +18 -0
  170. package/lib-esm/models/apis/leaflet/leaflet-circle.js +163 -0
  171. package/lib-esm/models/apis/leaflet/leaflet-circle.js.map +1 -0
  172. package/lib-esm/models/apis/leaflet/leaflet-geojson.d.ts +9 -0
  173. package/lib-esm/models/apis/leaflet/leaflet-geojson.js +73 -0
  174. package/lib-esm/models/apis/leaflet/leaflet-geojson.js.map +1 -0
  175. package/lib-esm/models/apis/leaflet/leaflet-map.d.ts +16 -0
  176. package/lib-esm/models/apis/leaflet/leaflet-map.js +140 -0
  177. package/lib-esm/models/apis/leaflet/leaflet-map.js.map +1 -0
  178. package/lib-esm/models/apis/leaflet/leaflet-markers.d.ts +29 -0
  179. package/lib-esm/models/apis/leaflet/leaflet-markers.js +294 -0
  180. package/lib-esm/models/apis/leaflet/leaflet-markers.js.map +1 -0
  181. package/lib-esm/models/apis/leaflet/leaflet-overlay.d.ts +10 -0
  182. package/lib-esm/models/apis/leaflet/leaflet-overlay.js +35 -0
  183. package/lib-esm/models/apis/leaflet/leaflet-overlay.js.map +1 -0
  184. package/lib-esm/models/apis/leaflet/leaflet-polygons.d.ts +23 -0
  185. package/lib-esm/models/apis/leaflet/leaflet-polygons.js +211 -0
  186. package/lib-esm/models/apis/leaflet/leaflet-polygons.js.map +1 -0
  187. package/lib-esm/models/apis/leaflet/leaflet-polylines.d.ts +55 -0
  188. package/lib-esm/models/apis/leaflet/leaflet-polylines.js +721 -0
  189. package/lib-esm/models/apis/leaflet/leaflet-polylines.js.map +1 -0
  190. package/lib-esm/models/apis/leaflet/leaflet-popup.d.ts +11 -0
  191. package/lib-esm/models/apis/leaflet/leaflet-popup.js +74 -0
  192. package/lib-esm/models/apis/leaflet/leaflet-popup.js.map +1 -0
  193. package/lib-esm/models/apis/leaflet.d.ts +99 -0
  194. package/lib-esm/models/apis/leaflet.js +464 -0
  195. package/lib-esm/models/apis/leaflet.js.map +1 -0
  196. package/lib-esm/models/apis/mapFunctions.d.ts +85 -0
  197. package/lib-esm/models/apis/mapFunctions.js +2 -0
  198. package/lib-esm/models/apis/mapFunctions.js.map +1 -0
  199. package/lib-esm/models/dto/event-type.d.ts +33 -0
  200. package/lib-esm/models/dto/event-type.js +39 -0
  201. package/lib-esm/models/dto/event-type.js.map +1 -0
  202. package/lib-esm/models/dto/map-type.d.ts +4 -0
  203. package/lib-esm/models/dto/map-type.js +6 -0
  204. package/lib-esm/models/dto/map-type.js.map +1 -0
  205. package/lib-esm/models/dto/polyline-type.d.ts +5 -0
  206. package/lib-esm/models/dto/polyline-type.js +7 -0
  207. package/lib-esm/models/dto/polyline-type.js.map +1 -0
  208. package/lib-esm/models/features/circle/circle-alter-options.d.ts +12 -0
  209. package/lib-esm/models/features/circle/circle-alter-options.js +14 -0
  210. package/lib-esm/models/features/circle/circle-alter-options.js.map +1 -0
  211. package/lib-esm/models/features/circle/circle-options.d.ts +15 -0
  212. package/{src → lib-esm/models/features}/circle/circle-options.js +6 -4
  213. package/lib-esm/models/features/circle/circle-options.js.map +1 -0
  214. package/lib-esm/models/features/events/event-return.d.ts +4 -0
  215. package/lib-esm/models/features/events/event-return.js +8 -0
  216. package/lib-esm/models/features/events/event-return.js.map +1 -0
  217. package/lib-esm/models/features/geojson/geojson-options.d.ts +5 -0
  218. package/lib-esm/models/features/geojson/geojson-options.js +9 -0
  219. package/lib-esm/models/features/geojson/geojson-options.js.map +1 -0
  220. package/lib-esm/models/features/marker/circle-marker-options.d.ts +9 -0
  221. package/lib-esm/models/features/marker/circle-marker-options.js +12 -0
  222. package/lib-esm/models/features/marker/circle-marker-options.js.map +1 -0
  223. package/lib-esm/models/features/marker/circle-marker-style.d.ts +8 -0
  224. package/lib-esm/models/features/marker/circle-marker-style.js +12 -0
  225. package/lib-esm/models/features/marker/circle-marker-style.js.map +1 -0
  226. package/lib-esm/models/features/marker/marker-alter-options.d.ts +8 -0
  227. package/lib-esm/models/features/marker/marker-alter-options.js +10 -0
  228. package/lib-esm/models/features/marker/marker-alter-options.js.map +1 -0
  229. package/lib-esm/models/features/marker/marker-icon.d.ts +6 -0
  230. package/lib-esm/models/features/marker/marker-icon.js +10 -0
  231. package/lib-esm/models/features/marker/marker-icon.js.map +1 -0
  232. package/lib-esm/models/features/marker/marker-options.d.ts +11 -0
  233. package/lib-esm/models/features/marker/marker-options.js +18 -0
  234. package/lib-esm/models/features/marker/marker-options.js.map +1 -0
  235. package/lib-esm/models/features/marker-clusterer/marker-clusterer-config.d.ts +6 -0
  236. package/lib-esm/models/features/marker-clusterer/marker-clusterer-config.js +10 -0
  237. package/lib-esm/models/features/marker-clusterer/marker-clusterer-config.js.map +1 -0
  238. package/lib-esm/models/features/overlay/overlay-options.d.ts +11 -0
  239. package/lib-esm/models/features/overlay/overlay-options.js +15 -0
  240. package/lib-esm/models/features/overlay/overlay-options.js.map +1 -0
  241. package/lib-esm/models/features/polygons/polygon-alter-options.d.ts +13 -0
  242. package/lib-esm/models/features/polygons/polygon-alter-options.js +14 -0
  243. package/lib-esm/models/features/polygons/polygon-alter-options.js.map +1 -0
  244. package/lib-esm/models/features/polygons/polygon-options.d.ts +15 -0
  245. package/{src → lib-esm/models/features}/polygons/polygon-options.js +7 -5
  246. package/lib-esm/models/features/polygons/polygon-options.js.map +1 -0
  247. package/lib-esm/models/features/polyline/navigations-options.d.ts +11 -0
  248. package/lib-esm/models/features/polyline/navigations-options.js +16 -0
  249. package/lib-esm/models/features/polyline/navigations-options.js.map +1 -0
  250. package/lib-esm/models/features/polyline/polyline-options.d.ts +18 -0
  251. package/lib-esm/models/features/polyline/polyline-options.js +20 -0
  252. package/lib-esm/models/features/polyline/polyline-options.js.map +1 -0
  253. package/lib-esm/models/features/popup/popup-options.d.ts +9 -0
  254. package/lib-esm/models/features/popup/popup-options.js +13 -0
  255. package/lib-esm/models/features/popup/popup-options.js.map +1 -0
  256. package/lib-esm/utils/maps-api-loader.service.d.ts +14 -0
  257. package/lib-esm/utils/maps-api-loader.service.js +89 -0
  258. package/lib-esm/utils/maps-api-loader.service.js.map +1 -0
  259. package/lib-esm/utils/url-builder.d.ts +20 -0
  260. package/lib-esm/utils/url-builder.js +44 -0
  261. package/lib-esm/utils/url-builder.js.map +1 -0
  262. package/package.json +69 -53
  263. package/test/test.js +11 -0
  264. package/tslint.json +24 -0
  265. package/typings.json +5 -0
  266. package/.babelrc +0 -4
  267. package/.editorconfig +0 -12
  268. package/.eslintrc +0 -291
  269. package/.nvmrc +0 -1
  270. package/.travis.yml +0 -5
  271. package/demo/demo.js +0 -432
  272. package/demo/images/cursor_locate.png +0 -0
  273. package/demo/images/inicio_rota.png +0 -0
  274. package/demo/index.html +0 -58
  275. package/demo/style.css +0 -45
  276. package/lib/inlogMaps.js +0 -16326
  277. package/lib/inlogMaps.js.map +0 -1
  278. package/lib/inlogMaps.min.js +0 -5
  279. package/src/circle/circle-alter-options.js +0 -9
  280. package/src/events/event-return.js +0 -5
  281. package/src/google-maps.js +0 -722
  282. package/src/index.js +0 -36
  283. package/src/leaflet.js +0 -638
  284. package/src/map.js +0 -306
  285. package/src/marker/circle-marker-options.js +0 -9
  286. package/src/marker/circle-marker-style.js +0 -9
  287. package/src/marker/marker-alter-options.js +0 -7
  288. package/src/marker/marker-icon.js +0 -6
  289. package/src/marker/marker-options.js +0 -10
  290. package/src/polygons/polygon-alter-options.js +0 -9
  291. package/src/polyline/navigations-options.js +0 -6
  292. package/src/polyline/polyline-alter-options.js +0 -9
  293. package/src/polyline/polyline-navigation-options.js +0 -15
  294. package/src/polyline/polyline-options.js +0 -12
  295. package/src/popup/popup-options.js +0 -7
  296. package/test/index.spec.js +0 -32
  297. package/webpack.config.js +0 -50
  298. package/yarn.lock +0 -3403
package/src/map.js DELETED
@@ -1,306 +0,0 @@
1
- import GoogleMaps from './google-maps';
2
- import Leaflet from './leaflet';
3
-
4
- export default class Map {
5
- constructor(mapType) {
6
- this.map = mapType === 'Google' ? new GoogleMaps() : new Leaflet();
7
-
8
- // generic lists
9
- this._markersList = {};
10
- this._polygonsList = {};
11
- this._circlesList = {};
12
- this._polylinesList = {};
13
- this._infoWindowList = {};
14
- }
15
-
16
- /* GEOJson */
17
- /**
18
- * Use this function to add GEOJSON to the map
19
- * @param {string} data
20
- * @param {*} options are the created object's parameters
21
- * {
22
- * editable: boolean,
23
- * draggable: boolean
24
- * }
25
- * @param {function} eventClick is a function callback to the action on click
26
- */
27
- loadGEOJson(data, options, eventClick) {
28
- let self = this;
29
-
30
- self.map._loadGEOJson(data, options, eventClick);
31
- }
32
-
33
- /* Markers */
34
- /**
35
- * Use this function to draw markers in the map
36
- * @param {tring} type is the type of the marker to help you find it later
37
- * @param {inlogMaps.MarkerOptions} options are the parameters of the marker
38
- * @param {function} eventClick is a function callback to the action on click
39
- */
40
- drawMarker(type, options, eventClick) {
41
- let self = this;
42
- let marker = self.map._drawMarker(options, eventClick);
43
-
44
- if (!self._markersList[type]) {
45
- self._markersList[type] = [];
46
- }
47
- marker.type = 'simple';
48
- self._markersList[type].push(marker);
49
- }
50
-
51
- /**
52
- * Use this function to draw circle markers in the map
53
- * @param {string} type is the type of the marker to help you find it later
54
- * @param {inlogMaps.CircleMarkerOptions} options are the parameters of the circle marker
55
- * @param {function} eventClick is a function callback to the action on click
56
- */
57
- drawCircleMarker(type, options, eventClick) {
58
- let self = this;
59
- let marker = self.map._drawCircleMarker(options, eventClick);
60
-
61
- if (!self._markersList[type]) {
62
- self._markersList[type] = [];
63
- }
64
- marker.type = 'circle';
65
- self._markersList[type].push(marker);
66
- }
67
-
68
- /**
69
- * Use this function to show/hide markers from a especific type
70
- * @param {boolean} show
71
- * @param {string} type is the type of the marker you created
72
- */
73
- showMarkers(show, type) {
74
- let self = this;
75
- let markers = self._markersList[type];
76
-
77
- if (markers) {
78
- self.map._showMarkers(markers, show);
79
- }
80
- }
81
-
82
- /**
83
- * Use this function to alter marker style
84
- * @param {string} type is the type of the marker to help you find it later
85
- * @param {inlogMaps.MarkerAlterOptions} options are the style parameters of the marker
86
- */
87
- alterMarkerOptions(type, options) {
88
- let self = this;
89
- let markers = self._markersList[type];
90
-
91
- if (markers) {
92
- self.map._alterMarkerOptions(markers, options);
93
- }
94
- }
95
-
96
- /* Polygons */
97
- /**
98
- * Use this function to draw polygons
99
- * @param {string} type is the type of the polygon to help you find it later
100
- * @param {inlogMaps.PolygonOptions} options are the parameters of the polygon
101
- * @param {function} eventClick
102
- */
103
- drawPolygon(type, options, eventClick) {
104
- let self = this;
105
- let polygon = self.map._drawPolygon(options, eventClick);
106
-
107
- if (!self._polygonsList[type]) {
108
- self._polygonsList[type] = [];
109
- }
110
- self._polygonsList[type].push(polygon);
111
- }
112
-
113
- /**
114
- * Use this function to show/hide polygon from a especific type
115
- * @param {boolean} show
116
- * @param {string} type
117
- */
118
- showPolygons(show, type) {
119
- let self = this;
120
- let polygons = self._polygonsList[type];
121
-
122
- if (polygons) {
123
- self.map._showPolygons(polygons, show);
124
- }
125
- }
126
-
127
- /**
128
- * Use this function to alter polygons options/style
129
- * @param {string} type is the type of the polygon to help you find it later
130
- * @param {inlogMaps.PolygonAlterOptions} options are the parameters of the polygon
131
- */
132
- alterPolygonOptions(type, options) {
133
- let self = this;
134
- let polygons = self._polygonsList[type];
135
-
136
- if (polygons) {
137
- self.map._alterPolygonOptions(polygons, options);
138
- }
139
- }
140
-
141
- /* Polylines */
142
- /**
143
- * Use this function to draw polylines on the map
144
- * @param {string} type
145
- * @param {inlogMaps.PolylineOptions} options
146
- * @param {function} eventClick
147
- */
148
- drawPolyline(type, options, eventClick) {
149
- let self = this;
150
- let polyline = self.map._drawPolyline(options, eventClick);
151
-
152
- self._polylinesList[type] = polyline;
153
- }
154
-
155
- /**
156
- * Use this function to draw polylines with navigation on the map
157
- * @param {string} type
158
- * @param {inlogMaps.PolylineNavigationOptions} options
159
- */
160
- drawPolylineWithNavigation(type, options) {
161
- let self = this;
162
- let polyline = self.map._drawPolylineWithNavigation(options);
163
-
164
- self._polylinesList[type] = polyline;
165
- }
166
-
167
- /**
168
- * Use this function to add more paths to a polyline
169
- * @param {string} type
170
- * @param {Array} position
171
- */
172
- addPolylinePath(type, position) {
173
- let self = this;
174
-
175
- if (!self._polylinesList[type]) {
176
- self.drawPolyline(type, {
177
- addToMap: true
178
- });
179
- }
180
- let polyline = self._polylinesList[type];
181
-
182
- if (polyline) {
183
- self.map._addPolylinePath(polyline, position);
184
- }
185
- }
186
-
187
- /**
188
- * Use this function to clear polyline selected from the map
189
- */
190
- removePolylineHighlight() {
191
- let self = this;
192
-
193
- self.map._removePolylineHighlight();
194
- }
195
-
196
- /**
197
- * Use this function to show/hide polylines
198
- * @param {boolean} show
199
- * @param {string} type
200
- */
201
- showPolyline(show, type) {
202
- let self = this;
203
- let polyline = self._polylinesList[type];
204
-
205
- if (polyline) {
206
- self.map._showPolyline(polyline, show);
207
- }
208
- }
209
-
210
- /**
211
- * Use this function to alter polyline options
212
- * @param {string} type
213
- * @param {inlogMaps.PolylineAlterOptions} options
214
- */
215
- alterPolylineOptions(type, options) {
216
- let self = this;
217
- let polyline = self._polylinesList[type];
218
-
219
- if (polyline) {
220
- self.map._alterPolylineOptions(polyline, options);
221
- }
222
- };
223
-
224
- /* Circles */
225
- /**
226
- * Use this function to draw circles on the map
227
- * @param {string} type
228
- * @param {inlogMaps.CircleOptions} options
229
- * @param {function} eventClick
230
- */
231
- drawCircle(type, options, eventClick) {
232
- let self = this;
233
- let circle = self.map._drawCircle(options, eventClick);
234
-
235
- if (!self._circlesList[type]) {
236
- self._circlesList[type] = [];
237
- }
238
- self._circlesList[type].push(circle);
239
- }
240
-
241
- /**
242
- * Use this function to show/hide circles from a especific type
243
- * @param {boolean} show
244
- * @param {string} type
245
- */
246
- showCircles(show, type) {
247
- let self = this;
248
- let circles = self._circlesList[type];
249
-
250
- if (circles) {
251
- self.map._showCircles(circles, show);
252
- }
253
- }
254
-
255
- /**
256
- * Use this function to alter circle options
257
- * @param {string} type
258
- * @param {inlogMaps.CircleAlterOptions} options
259
- */
260
- alterCircleOptions(type, options) {
261
- let self = this;
262
- let circles = self._circlesList[type];
263
-
264
- if (circles) {
265
- self.map._alterCircleOptions(circles, options);
266
- }
267
- }
268
-
269
- /* Info Windows */
270
- /**
271
- * Use this function to draw popups on the map
272
- * @param {string} type
273
- * @param {inlogMaps.PopupOptions} options
274
- */
275
- drawPopup(type, options) {
276
- let self = this;
277
-
278
- if (self._infoWindowList[type]) {
279
- self.map._alterPopup(self._infoWindowList[type], options);
280
- } else {
281
- let infoWindow = self.map._drawPopup(options);
282
-
283
- self._infoWindowList[type] = infoWindow;
284
- }
285
- }
286
-
287
- /* Map */
288
- /**
289
- * Use this function to add event clicks on the map
290
- * @param {function} eventClick
291
- */
292
- addClickMap(eventClick) {
293
- let self = this;
294
-
295
- self.map._addClickMap(eventClick);
296
- }
297
-
298
- /**
299
- * Use this function to remove event clicks from the map
300
- */
301
- removeClickMap() {
302
- let self = this;
303
-
304
- self.map._removeClickMap();
305
- }
306
- }
@@ -1,9 +0,0 @@
1
- export default class CircleMarkerOptions {
2
- constructor(latlng, addToMap, style, fitBounds, object) {
3
- this.latlng = latlng;
4
- this.addToMap = addToMap;
5
- this.style = style;
6
- this.fitBounds = fitBounds;
7
- this.object = object;
8
- }
9
- }
@@ -1,9 +0,0 @@
1
- export default class CircleMarkerStyle {
2
- constructor(radius, weight, color, fillColor, fillOpacity) {
3
- this.radius = radius;
4
- this.weight = weight;
5
- this.color = color;
6
- this.fillColor = fillColor;
7
- this.fillOpacity = fillOpacity;
8
- }
9
- }
@@ -1,7 +0,0 @@
1
- export default class MarkerAlterOptions {
2
- constructor(latlng, icon, style) {
3
- this.latlng = latlng;
4
- this.icon = icon;
5
- this.style = style;
6
- }
7
- }
@@ -1,6 +0,0 @@
1
- export default class MarkerIcon {
2
- constructor(url, size) {
3
- this.url = url;
4
- this.size = size;
5
- }
6
- }
@@ -1,10 +0,0 @@
1
- export default class MarkerOptions {
2
- constructor(latlng, addToMap, draggable, icon, fitBounds, object) {
3
- this.latlng = latlng;
4
- this.addToMap = addToMap;
5
- this.draggable = draggable;
6
- this.icon = icon;
7
- this.fitBounds = fitBounds;
8
- this.object = object;
9
- }
10
- }
@@ -1,9 +0,0 @@
1
- export default class PolygonAlterOptions {
2
- constructor(addToMap, color, opacity, fillColor, fillOpacity) {
3
- this.addToMap = addToMap;
4
- this.color = color;
5
- this.opacity = opacity;
6
- this.fillColor = fillColor;
7
- this.fillOpacity = fillOpacity;
8
- }
9
- }
@@ -1,6 +0,0 @@
1
- export default class NavigationOptions {
2
- constructor(color, weight) {
3
- this.color = color;
4
- this.weight = weight;
5
- }
6
- }
@@ -1,9 +0,0 @@
1
- export default class PolylineAlterOptions {
2
- constructor(editable, draggable, color, weight, object) {
3
- this.editable = editable;
4
- this.draggable = draggable;
5
- this.color = color;
6
- this.weight = weight;
7
- this.object = object;
8
- }
9
- }
@@ -1,15 +0,0 @@
1
- export default class PolylineNavigationOptions {
2
- constructor(path, infowindows, addToMap, fitBounds, editable, draggable, color, weight, object,
3
- navigateOptions) {
4
- this.path = path;
5
- this.infowindows = infowindows;
6
- this.addToMap = addToMap;
7
- this.fitBounds = fitBounds;
8
- this.editable = editable;
9
- this.draggable = draggable;
10
- this.color = color;
11
- this.weight = weight;
12
- this.object = object;
13
- this.navigateOptions = navigateOptions;
14
- }
15
- }
@@ -1,12 +0,0 @@
1
- export default class PolylineOptions {
2
- constructor(path, addToMap, fitBounds, editable, draggable, color, weight, object) {
3
- this.path = path;
4
- this.addToMap = addToMap;
5
- this.fitBounds = fitBounds;
6
- this.editable = editable;
7
- this.draggable = draggable;
8
- this.color = color;
9
- this.weight = weight;
10
- this.object = object;
11
- }
12
- }
@@ -1,7 +0,0 @@
1
- export default class PopupOptions {
2
- constructor(latlng, content, marker) {
3
- this.latlng = latlng;
4
- this.content = content;
5
- this.marker = marker;
6
- }
7
- }
@@ -1,32 +0,0 @@
1
- /* global describe, it, before */
2
-
3
- import chai from 'chai';
4
- //import {Cat, Dog} from '../lib/webpack-library-starter.js';
5
-
6
- chai.expect();
7
-
8
- const expect = chai.expect;
9
-
10
- let lib;
11
-
12
- /*describe('Given an instance of my Cat library', () => {
13
- before(() => {
14
- lib = new Cat();
15
- });
16
- describe('when I need the name', () => {
17
- it('should return the name', () => {
18
- expect(lib.name).to.be.equal('Cat');
19
- });
20
- });
21
- });
22
-
23
- describe('Given an instance of my Dog library', () => {
24
- before(() => {
25
- lib = new Dog();
26
- });
27
- describe('when I need the name', () => {
28
- it('should return the name', () => {
29
- expect(lib.name).to.be.equal('Dog');
30
- });
31
- });
32
- });*/
package/webpack.config.js DELETED
@@ -1,50 +0,0 @@
1
- /* global __dirname, require, module*/
2
-
3
- const webpack = require('webpack');
4
- const UglifyJsPlugin = webpack.optimize.UglifyJsPlugin;
5
- const path = require('path');
6
- const env = require('yargs').argv.env; // use --env with webpack 2
7
-
8
- let libraryName = 'inlogMaps';
9
-
10
- let plugins = [], outputFile;
11
-
12
- if (env === 'build') {
13
- plugins.push(new UglifyJsPlugin({minimize: true}));
14
- outputFile = libraryName + '.min.js';
15
- } else {
16
- outputFile = libraryName + '.js';
17
- }
18
-
19
- const config = {
20
- entry: __dirname + '/src/index.js',
21
- devtool: 'source-map',
22
- output: {
23
- path: __dirname + '/lib',
24
- filename: outputFile,
25
- library: libraryName,
26
- libraryTarget: 'umd',
27
- umdNamedDefine: true
28
- },
29
- module: {
30
- rules: [
31
- {
32
- test: /(\.jsx|\.js)$/,
33
- loader: 'babel-loader',
34
- exclude: /(node_modules|bower_components)/
35
- },
36
- {
37
- test: /(\.jsx|\.js)$/,
38
- loader: 'eslint-loader',
39
- exclude: /node_modules/
40
- }
41
- ]
42
- },
43
- resolve: {
44
- modules: [path.resolve('./node_modules'), path.resolve('./src')],
45
- extensions: ['.json', '.js']
46
- },
47
- plugins: plugins
48
- };
49
-
50
- module.exports = config;