Repositorio del curso CCOM4030 el semestre B91 del proyecto Paz para la Mujer

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432
  1. var data = [
  2. {
  3. position: {lng: -66.056812, lat: 18.415312},
  4. title: "Centro de Ayuda a Víctimas de Violación"
  5. },
  6. {
  7. position: {lng: -66.227438, lat: 18.218187},
  8. title: "Casa Juana Colón"
  9. },
  10. {
  11. position: {lng: -66.265938, lat: 18.140312},
  12. title: "Envejecer en Armonía"
  13. },
  14. {
  15. position: {lng: -66.703438, lat: 18.265812},
  16. title: "Fundación Alas a la Mujer"
  17. },
  18. {
  19. position: {lng: -66.740563, lat: 18.444438},
  20. title: "Oficina para Promoción y Desarrollo Humano"
  21. },
  22. {
  23. position: {lng: -66.051063, lat: 18.219813},
  24. title: "Centro Salud Justicia de Puerto Rico"
  25. },
  26. {
  27. position: {lng: -66.051687, lat: 18.412188},
  28. title: "Centro Comunitario LGBT"
  29. },
  30. {
  31. position: {lng: -65.833312, lat: 18.422687},
  32. title: "Taller Salud"
  33. },
  34. {
  35. position: {lng: -66.075187, lat: 18.399687},
  36. title: "Profamilias"
  37. },
  38. {
  39. position: {lng: -66.056437, lat: 18.402188},
  40. title: "Instituto del Hogar Celia y Harrys Bunker, Proyecto Criando para la Paz"
  41. },
  42. {
  43. position: {lng: -66.052188, lat: 18.403937},
  44. title: "Centro de Apoyo para Víctimas el Crimen"
  45. },
  46. {
  47. position: {lng: -66.058062, lat: 18.427938},
  48. title: "Oficina de la Procuradora de las Mujeres"
  49. },
  50. {
  51. position: {lng: -66.074562, lat: 18.396437},
  52. title: "Instituto de Deficiencias en el Desarrollo, UPR RCM"
  53. },
  54. {
  55. position: {lng: -67.139813, lat: 18.212188},
  56. title: "Proyecto Apoyo a Mujeres Sobrevivientes de Violencia Doméstica, Siempre Vivas, UPRM"
  57. }
  58. ];
  59. var app = {
  60. // Application Constructor
  61. initialize: function() {
  62. document.addEventListener('deviceready', this.onDeviceReady.bind(this), false);
  63. },
  64. // deviceready Event Handler
  65. //
  66. // Bind any cordova events here. Common events are:
  67. // 'pause', 'resume', etc.
  68. onDeviceReady: function() {
  69. this.receivedEvent('deviceready');
  70. },
  71. // Update DOM on a Received Event
  72. receivedEvent: function(id) {
  73. navigator.geolocation.getCurrentPosition(onMapSuccess, onMapError, { enableHighAccuracy: true });
  74. }
  75. };
  76. app.initialize();
  77. // Success callback for get geo coordinates
  78. var onMapSuccess = function (position) {
  79. Latitude = position.coords.latitude;
  80. Longitude = position.coords.longitude;
  81. getMap(Latitude, Longitude);
  82. }
  83. function getMap(Latitude, Longitude){
  84. var latLong = new google.maps.LatLng(Latitude, Longitude);
  85. var mapOptions = {
  86. center: latLong,
  87. zoom: 8,
  88. mapTypeId: google.maps.MapTypeId.ROADMAP
  89. };
  90. //MAPA
  91. var map = new google.maps.Map(document.getElementById("map"), mapOptions);
  92. //MARKERS
  93. var contentString = '<div id="content">'+
  94. '<div id="siteNotice">'+
  95. '</div>'+
  96. '<h1 id="firstHeading" class="firstHeading">Centro de Ayuda a Víctimas de Violación</h1>'+
  97. '<p>Attribution: Uluru, <a href="https://en.wikipedia.org/w/index.php?title=Uluru&oldid=297882194">'+
  98. 'https://en.wikipedia.org/w/index.php?title=Uluru</a> '+
  99. '(last visited June 22, 2009).</p>'+
  100. '</div>';
  101. var infowindow = new google.maps.InfoWindow({
  102. content: contentString,
  103. maxWidth: 300
  104. });
  105. var marker = new google.maps.Marker({position: data[0]['position'], title: data[0]['title'], map: map});
  106. marker.addListener('click', function() {
  107. infowindow.open(map, marker);
  108. });
  109. /////////////////////////////////////////////////////////////////////////////
  110. var contentString1 = '<div id="content">'+
  111. '<div id="siteNotice">'+
  112. '</div>'+
  113. '<h1 id="firstHeading" class="firstHeading">Casa Juana Colón</h1>'+
  114. '<div id="bodyContent">'+
  115. '<p>Attribution: Uluru, <a href="https://en.wikipedia.org/w/index.php?title=Uluru&oldid=297882194">'+
  116. 'https://en.wikipedia.org/w/index.php?title=Uluru</a> '+
  117. '(last visited June 22, 2009).</p>'+
  118. '</div>';
  119. var infowindow1 = new google.maps.InfoWindow({
  120. content: contentString1,
  121. maxWidth: 300
  122. });
  123. var marker1 = new google.maps.Marker({position: data[1]['position'], title: data[1]['title'],map: map});
  124. marker1.addListener('click', function() {
  125. infowindow1.open(map, marker1);
  126. });
  127. ////////////////////////////////////////////////////////////////////////////////
  128. var contentString2 = '<div id="content">'+
  129. '<div id="siteNotice">'+
  130. '</div>'+
  131. '<h1 id="firstHeading" class="firstHeading">Envejecer en Armonía</h1>'+
  132. '<div id="bodyContent">'+
  133. '<p>Attribution: Uluru, <a href="https://en.wikipedia.org/w/index.php?title=Uluru&oldid=297882194">'+
  134. 'https://en.wikipedia.org/w/index.php?title=Uluru</a> '+
  135. '(last visited June 22, 2009).</p>'+
  136. '</div>';
  137. var infowindow2 = new google.maps.InfoWindow({
  138. content: contentString2,
  139. maxWidth: 300
  140. });
  141. var marker2 = new google.maps.Marker({position: data[2]['position'], title: data[2]['title'],map: map});
  142. marker2.addListener('click', function() {
  143. infowindow2.open(map, marker2);
  144. });
  145. /////////////////////////////////////////////////////////////////////////////////
  146. var contentString3 = '<div id="content">'+
  147. '<div id="siteNotice">'+
  148. '</div>'+
  149. '<h1 id="firstHeading" class="firstHeading">Fundación Alas a la Mujer</h1>'+
  150. '<div id="bodyContent">'+
  151. '<p>Attribution: Uluru, <a href="https://en.wikipedia.org/w/index.php?title=Uluru&oldid=297882194">'+
  152. 'https://en.wikipedia.org/w/index.php?title=Uluru</a> '+
  153. '(last visited June 22, 2009).</p>'+
  154. '</div>';
  155. var infowindow3 = new google.maps.InfoWindow({
  156. content: contentString3,
  157. maxWidth: 300
  158. });
  159. var marker3 = new google.maps.Marker({position: data[3]['position'], title: data[3]['title'],map: map});
  160. marker3.addListener('click', function() {
  161. infowindow3.open(map, marker3);
  162. });
  163. ////////////////////////////////////////////////////////////////////////////////////
  164. var contentString4 = '<div id="content">'+
  165. '<div id="siteNotice">'+
  166. '</div>'+
  167. '<h1 id="firstHeading" class="firstHeading">Oficina para Promoción y Desarrollo Humano</h1>'+
  168. '<div id="bodyContent">'+
  169. '<p>Attribution: Uluru, <a href="https://en.wikipedia.org/w/index.php?title=Uluru&oldid=297882194">'+
  170. 'https://en.wikipedia.org/w/index.php?title=Uluru</a> '+
  171. '(last visited June 22, 2009).</p>'+
  172. '</div>';
  173. var infowindow4 = new google.maps.InfoWindow({
  174. content: contentString4,
  175. maxWidth: 300
  176. });
  177. var marker4 = new google.maps.Marker({position: data[4]['position'], title: data[4]['title'],map: map});
  178. marker4.addListener('click', function() {
  179. infowindow4.open(map, marker4);
  180. });
  181. //////////////////////////////////////////////////////////////////////////////////
  182. var contentString5 = '<div id="content">'+
  183. '<div id="siteNotice">'+
  184. '</div>'+
  185. '<h1 id="firstHeading" class="firstHeading">Centro Salud Justicia de Puerto Rico</h1>'+
  186. '<div id="bodyContent">'+
  187. '<p>Attribution: Uluru, <a href="https://en.wikipedia.org/w/index.php?title=Uluru&oldid=297882194">'+
  188. 'https://en.wikipedia.org/w/index.php?title=Uluru</a> '+
  189. '(last visited June 22, 2009).</p>'+
  190. '</div>';
  191. var infowindow5 = new google.maps.InfoWindow({
  192. content: contentString5,
  193. maxWidth: 300
  194. });
  195. var marker5 = new google.maps.Marker({position: data[5]['position'], title: data[5]['title'],map: map});
  196. marker5.addListener('click', function() {
  197. infowindow5.open(map, marker5);
  198. });
  199. //////////////////////////////////////////////////////////////////////////////////
  200. var contentString6 = '<div id="content">'+
  201. '<div id="siteNotice">'+
  202. '</div>'+
  203. '<h1 id="firstHeading" class="firstHeading">Centro Comunitario LGBT</h1>'+
  204. '<div id="bodyContent">'+
  205. '<p>Attribution: Uluru, <a href="https://en.wikipedia.org/w/index.php?title=Uluru&oldid=297882194">'+
  206. 'https://en.wikipedia.org/w/index.php?title=Uluru</a> '+
  207. '(last visited June 22, 2009).</p>'+
  208. '</div>';
  209. var infowindow6 = new google.maps.InfoWindow({
  210. content: contentString6,
  211. maxWidth: 300
  212. });
  213. var marker6 = new google.maps.Marker({position: data[6]['position'], title: data[6]['title'],map: map});
  214. marker6.addListener('click', function() {
  215. infowindow6.open(map, marker6);
  216. });
  217. //////////////////////////////////////////////////////////////////////////////////
  218. var contentString7 = '<div id="content">'+
  219. '<div id="siteNotice">'+
  220. '</div>'+
  221. '<h1 id="firstHeading" class="firstHeading">Taller Salud</h1>'+
  222. '<div id="bodyContent">'+
  223. '<p>Attribution: Uluru, <a href="https://en.wikipedia.org/w/index.php?title=Uluru&oldid=297882194">'+
  224. 'https://en.wikipedia.org/w/index.php?title=Uluru</a> '+
  225. '(last visited June 22, 2009).</p>'+
  226. '</div>';
  227. var infowindow7 = new google.maps.InfoWindow({
  228. content: contentString7,
  229. maxWidth: 300
  230. });
  231. var marker7 = new google.maps.Marker({position: data[7]['position'], title: data[7]['title'],map: map});
  232. marker7.addListener('click', function() {
  233. infowindow7.open(map, marker7);
  234. });
  235. //////////////////////////////////////////////////////////////////////////////////
  236. var contentString8 = '<div id="content">'+
  237. '<div id="siteNotice">'+
  238. '</div>'+
  239. '<h1 id="firstHeading" class="firstHeading">Profamilias</h1>'+
  240. '<div id="bodyContent">'+
  241. '<p>Attribution: Uluru, <a href="https://en.wikipedia.org/w/index.php?title=Uluru&oldid=297882194">'+
  242. 'https://en.wikipedia.org/w/index.php?title=Uluru</a> '+
  243. '(last visited June 22, 2009).</p>'+
  244. '</div>';
  245. var infowindow8 = new google.maps.InfoWindow({
  246. content: contentString8,
  247. maxWidth: 300
  248. });
  249. var marker8 = new google.maps.Marker({position: data[8]['position'], title: data[8]['title'],map: map});
  250. marker8.addListener('click', function() {
  251. infowindow8.open(map, marker8);
  252. });
  253. //////////////////////////////////////////////////////////////////////////////////
  254. var contentString9 = '<div id="content">'+
  255. '<div id="siteNotice">'+
  256. '</div>'+
  257. '<h1 id="firstHeading" class="firstHeading">Instituto del Hogar Celia y Harrys Bunker, Proyecto Criando para la Paz</h1>'+
  258. '<div id="bodyContent">'+
  259. '<p>Attribution: Uluru, <a href="https://en.wikipedia.org/w/index.php?title=Uluru&oldid=297882194">'+
  260. 'https://en.wikipedia.org/w/index.php?title=Uluru</a> '+
  261. '(last visited June 22, 2009).</p>'+
  262. '</div>';
  263. var infowindow9 = new google.maps.InfoWindow({
  264. content: contentString9,
  265. maxWidth: 300
  266. });
  267. var marker9 = new google.maps.Marker({position: data[9]['position'], title: data[9]['title'],map: map})
  268. marker9.addListener('click', function() {
  269. infowindow9.open(map, marker9);
  270. });
  271. /////////////////////////////////////////////////////////////////////////////////////
  272. var contentString10 = '<div id="content">'+
  273. '<div id="siteNotice">'+
  274. '</div>'+
  275. '<h1 id="firstHeading" class="firstHeading">Centro de Apoyo para Víctimas el Crimen</h1>'+
  276. '<div id="bodyContent">'+
  277. '<p>Attribution: Uluru, <a href="https://en.wikipedia.org/w/index.php?title=Uluru&oldid=297882194">'+
  278. 'https://en.wikipedia.org/w/index.php?title=Uluru</a> '+
  279. '(last visited June 22, 2009).</p>'+
  280. '</div>';
  281. var infowindow10 = new google.maps.InfoWindow({
  282. content: contentString10,
  283. maxWidth: 300
  284. });
  285. var marker10 = new google.maps.Marker({position: data[10]['position'], title: data[10]['title'],map: map})
  286. marker10.addListener('click', function() {
  287. infowindow10.open(map, marker10);
  288. });
  289. ////////////////////////////////////////////////////////////////////////////////////////
  290. var contentString11 = '<div id="content">'+
  291. '<div id="siteNotice">'+
  292. '</div>'+
  293. '<h1 id="firstHeading" class="firstHeading">Oficina de la Procuradora de las Mujeres</h1>'+
  294. '<div id="bodyContent">'+
  295. '<p>Attribution: Uluru, <a href="https://en.wikipedia.org/w/index.php?title=Uluru&oldid=297882194">'+
  296. 'https://en.wikipedia.org/w/index.php?title=Uluru</a> '+
  297. '(last visited June 22, 2009).</p>'+
  298. '</div>';
  299. var infowindow11 = new google.maps.InfoWindow({
  300. content: contentString11,
  301. maxWidth: 300
  302. });
  303. var marker11 = new google.maps.Marker({position: data[10]['position'], title: data[10]['title'],map: map})
  304. marker11.addListener('click', function() {
  305. infowindow11.open(map, marker11);
  306. });
  307. ///////////////////////////////////////////////////////////////////////////////////////////
  308. var contentString11 = '<div id="content">'+
  309. '<div id="siteNotice">'+
  310. '</div>'+
  311. '<h1 id="firstHeading" class="firstHeading">Oficina de la Procuradora de las Mujeres</h1>'+
  312. '<div id="bodyContent">'+
  313. '<p>Attribution: Uluru, <a href="https://en.wikipedia.org/w/index.php?title=Uluru&oldid=297882194">'+
  314. 'https://en.wikipedia.org/w/index.php?title=Uluru</a> '+
  315. '(last visited June 22, 2009).</p>'+
  316. '</div>';
  317. var infowindow11 = new google.maps.InfoWindow({
  318. content: contentString11,
  319. maxWidth: 300
  320. });
  321. var marker11 = new google.maps.Marker({position: data[11]['position'], title: data[11]['title'],map: map})
  322. marker11.addListener('click', function() {
  323. infowindow11.open(map, marker11);
  324. });
  325. /////////////////////////////////////////////////////////////////////////////////////////////
  326. var contentString12 = '<div id="content">'+
  327. '<div id="siteNotice">'+
  328. '</div>'+
  329. '<h1 id="firstHeading" class="firstHeading">Instituto de Deficiencias en el Desarrollo, UPR RCM</h1>'+
  330. '<div id="bodyContent">'+
  331. '<p>Attribution: Uluru, <a href="https://en.wikipedia.org/w/index.php?title=Uluru&oldid=297882194">'+
  332. 'https://en.wikipedia.org/w/index.php?title=Uluru</a> '+
  333. '(last visited June 22, 2009).</p>'+
  334. '</div>';
  335. var infowindow12 = new google.maps.InfoWindow({
  336. content: contentString12,
  337. maxWidth: 300
  338. });
  339. var marker12 = new google.maps.Marker({position: data[12]['position'], title: data[12]['title'],map: map})
  340. marker12.addListener('click', function() {
  341. infowindow12.open(map, marker12);
  342. });
  343. //////////////////////////////////////////////////////////////////////////////////////////////
  344. var contentString13 = '<div id="content">'+
  345. '<div id="siteNotice">'+
  346. '</div>'+
  347. '<h1 id="firstHeading" class="firstHeading">Proyecto Apoyo a Mujeres Sobrevivientes de Violencia Doméstica, Siempre Vivas, UPRM</h1>'+
  348. '<div id="bodyContent">'+
  349. '<p>Attribution: Uluru, <a href="https://en.wikipedia.org/w/index.php?title=Uluru&oldid=297882194">'+
  350. 'https://en.wikipedia.org/w/index.php?title=Uluru</a> '+
  351. '(last visited June 22, 2009).</p>'+
  352. '</div>';
  353. var infowindow13 = new google.maps.InfoWindow({
  354. content: contentString13,
  355. maxWidth: 300
  356. });
  357. var marker13 = new google.maps.Marker({position: data[13]['position'], title: data[13]['title'],map: map})
  358. marker13.addListener('click', function() {
  359. infowindow13.open(map, marker13);
  360. });
  361. }
  362. // Error callback
  363. function onMapError(error) {
  364. console.log('code: ' + error.code + '\n' +
  365. 'message: ' + error.message + '\n');
  366. }