Jump to content

Map Marker Map


ryan

Recommended Posts

On 12/23/2018 at 9:54 PM, mel47 said:

Hi

I have a problem that I didn't have before (not sure when was "before" though...). However all last year' pages displayed a correct localization.

If I typed an address, it will not localized until I check/uncheck the geocode true/false. However, saving the page doesn't retain the "ok rooftop" result, and return to "request denied". After a couple of saving pages, I eventually get lat/long saved but the status is still "request denied".

Furthermore, I discovered I can't modify addresses on certain pages (those created by guest (form builder)). It may be related to my similar problem about image undeletable.

Under 3.0.123, both local and production. Google API is enabled for billing. Anyway, address with a previous correct localization are displayed fine.

Thanks!

I found a workaround, related to an other issue. I ended by moving the order of fields.
BTW, no error in console.

Thanks

Link to comment
Share on other sites

  • 1 month later...

Maybe I'm missing something, but now, where once Google maps were working, I get a message saying that Google maps did not load correctly.  I believe it is because Google now requires an api key.  But I can't see where to put an api key into the markupgooglemaps module.  How do I make maps work again?

 

Link to comment
Share on other sites

My API key is configured correctly in FieldtypeMapMarker. I have the same problem than kbutler64 tough... Saying that Google maps did not load correctly on each map.

These are the error I get in Chrome inspector:

util.js:221 Google Maps JavaScript API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys
lw.m @ util.js:221
util.js:221 Google Maps JavaScript API warning: SensorNotRequired https://developers.google.com/maps/documentation/javascript/error-messages#sensor-not-required
lw.m @ util.js:221

As requested by the module document, i added this line in the head: 

<script type='text/javascript' src='https://maps.googleapis.com/maps/api/js?sensor=false'></script>

Google now says it's not required.. I also notice this code,required by Google API, it not loaded in the page.  

<script async defer src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap"
  type="text/javascript"></script>

What should I do?

Link to comment
Share on other sites

You have to place this "<script src="https://maps.googleapis.com/maps/api/js?key=[your_API]"></script>" in the <head> part of your template or "head.inc" or whatever.

But you also have to register your site(s) with a Google Cloud Platform https://console.cloud.google.com/apis/credentials for it to allow the API on that site.

Link to comment
Share on other sites

  • 2 weeks later...

Hello!

This field holds 3 pieces of data. The address, longitude and latitude. The latter two are numerical data which does not need translation. The address field is what is send to Google to get the coordinates. I do not think there is an easy way to make it multilingual (it is not now as far as I know). But there is always a way to store multilingual address information in other fields of the same page, and use this information to generate marker descriptions (for example) for each language needed.

Link to comment
Share on other sites

  • 1 month later...

Hey everyone,

I did see, that other users were struggling with the problem, that there are no Markers displayed in the frontend, but I could not find any replies to that problem. 
If I render a map, the coordinates are correct, but the marker icon is not displayed. It displays in the backend, but not in the frontend, also if if but the path to a custom image in the map options. Nothing. 
Does anyone have the same problem?

Thanks for any hints

Link to comment
Share on other sites

Hi,

I have a recurrent problem of an error " 'MarkupGoogleMap' was used before it was defined. ". In some browser, the map display correctly but in some (IE) it just doesn't work.

I put the code in a JS validator, and I have the same error, but I don't know why and what I'm supposed to do, since I didn't play with this JS code. I also have " Expected 'mgmap1' at column 1, not column 37. "

Spoiler

<head>
    	<script async defer src="https://maps.googleapis.com/maps/api/js?key=MYKEY"  type="text/javascript"></script>
</head>

<div id='mgmap1' class='MarkupGoogleMap' style='width: 100%; height: 250px;'></div><script type='text/javascript'>

var mgmap1 = new MarkupGoogleMap(); mgmap1.setOption('zoom', 19); mgmap1.setOption('mapTypeId', google.maps.MapTypeId.ROADMAP); mgmap1.setHoverBox('<div data-top="-10" data-left="15" style="background: #000; color: #fff; padding: 0.25em 0.5em; border-radius: 3px;"></div>');mgmap1.init('mgmap1', 45.558225, -73.551839); mgmap1.addMarker(0.000000, 0.000000, '/programmation/facebook-live-avec-les-squelettes-de-baleines/', 'Facebook live avec les squelettes de baleines!', ''); mgmap1.addMarker(0.000000, 0.000000, '/programmation/concours-journalisme-scientifique-plume-de-science/', 'Concours journalisme scientifique - Plume de science', ''); mgmap1.addMarker(0.000000, 0.000000, '/programmation/grand-defi-quebecoiseaux-2019/', 'Grand Défi QuébecOiseaux 2019', ''); mgmap1.addMarker(0.000000, 0.000000, '/programmation/lodyssee-des-sciences-jeunesse/', 'L&#039;Odyssée des sciences jeunesse', ''); mgmap1.addMarker(47.837513, -69.536392, '/programmation/presentoir-science/', 'Présentoir science', ''); mgmap1.addMarker(46.020489, -73.044777, '/programmation/observation-des-oiseaux-de-proie-en-migration/', 'Observation des oiseaux de proie en migration', ''); mgmap1.addMarker(48.442829, -68.519707, '/programmation/rassemblement-scientifique-a-rimouski/', 'Rassemblement scientifique à Rimouski', ''); mgmap1.addMarker(48.451046, -68.525238, '/programmation/vitrine-exposition-livres-et-objets-thematiques/', 'Vitrine &amp; exposition: livres et objets thématiques', ''); mgmap1.addMarker(48.548431, -71.650375, '/programmation/des-avions-en-papier-inusites/', 'Des avions en papier inusités', ''); mgmap1.addMarker(48.684093, -72.487625, '/programmation/on-a-marche-sur-la-lune-50-ans-deja/', 'On a marche sur la Lune, 50 ans déjà', ''); mgmap1.addMarker(48.430279, -71.063011, '/programmation/soiree-dobservation-astronomique/', 'Soirée d&#039;observation astronomique', ''); mgmap1.addMarker(48.410259, -71.268867, '/programmation/pop-et-pigments/', 'Pop et pigments', ''); mgmap1.addMarker(46.836414, -71.214966, '/programmation/excursion-dobservation-des-oiseaux/', 'Excursion d&#039;observation des oiseaux', ''); mgmap1.addMarker(46.836414, -71.214966, '/programmation/connaitre-les-oiseaux-communs-qui-nous-entourent/', 'Connaître les oiseaux communs qui nous entourent', ''); mgmap1.addMarker(46.732670, -71.444519, '/programmation/excursion-ornithologique-guidee/', 'Excursion ornithologique guidée', ''); mgmap1.addMarker(46.768501, -71.371063, '/programmation/chasse-aux-bestioles-aux-floralies-jouvence/', 'Chasse aux bestioles aux Floralies Jouvence', ''); mgmap1.addMarker(46.733200, -71.443588, '/programmation/chasse-aux-bestioles-dans-le-parc-des-hauts-fonds/', 'Chasse aux bestioles dans le Parc des Hauts-Fonds', ''); mgmap1.addMarker(46.813988, -71.206612, '/programmation/a-vos-marques-prets-fouillez/', 'A vos marques... Prêts... Fouillez !', ''); mgmap1.addMarker(47.652554, -70.149353, '/programmation/decouverte-de-la-biodiversite-de-charlevoix/', 'Découverte de la Biodiversité de Charlevoix', ''); mgmap1.addMarker(46.792343, -71.264801, '/programmation/conference-demonstration-matiere-a-reflexion/', 'Conférence-démonstration MATIÈRE à réflexion', ''); mgmap1.addMarker(46.750938, -71.343697, '/programmation/festival-electrons-livres/', 'Festival Électrons Livres', ''); mgmap1.addMarker(47.064148, -70.796379, '/programmation/le-vent-dans-les-ailes/', 'Le vent dans les ailes', ''); mgmap1.addMarker(46.815228, -71.202332, '/programmation/erreur-watson-la-chimie-au-service-de-la-justice/', 'Erreur Watson : la chimie au service de la justice', ''); mgmap1.addMarker(47.064148, -70.796379, '/programmation/sur-la-piste-de-renard/', 'Sur la piste de Renard', ''); mgmap1.addMarker(47.064148, -70.796379, '/programmation/les-tresors-du-cap-tourmente/', 'Les trésors du Cap-Tourmente', ''); mgmap1.addMarker(47.064148, -70.796379, '/programmation/defi-grozoiseaux/', 'Défi Grozoiseaux', ''); mgmap1.addMarker(46.786736, -71.282288, '/programmation/les-abeilles-sentinelles-ecologiques/', 'Les abeilles, sentinelles écologiques', ''); mgmap1.addMarker(46.792343, -71.264801, '/programmation/construis-ton-spectroscope-et-decouvre-la-matiere/', 'Construis ton spectroscope et découvre la matière !', ''); mgmap1.addMarker(46.741184, -71.354439, '/programmation/mini-expo-astro-section-jeunesse-du-club-vega/', 'Mini expo astro section jeunesse du club véga', ''); mgmap1.addMarker(46.751629, -71.288765, '/programmation/du-changement-pour-une-terre-qui-nous-rend-fiers/', 'Du changement pour une Terre qui nous rend fiers !', ''); mgmap1.addMarker(46.792343, -71.264801, '/programmation/fabrique-ton-petit-chocolat-scientifique/', 'Fabrique ton petit chocolat scientifique', ''); mgmap1.addMarker(46.814323, -71.225792, '/programmation/livres-de-sciences-dans-les-bibliotheques-de-quebec/', 'Livres de sciences dans les bibliothèques de Québec', ''); mgmap1.addMarker(46.810051, -71.215881, '/programmation/les-mineraux-du-musee-canadien-de-la-nature-a-quebec/', 'Les minéraux du Musée canadien de la nature à Québec', ''); mgmap1.addMarker(46.770130, -71.294235, '/programmation/des-medicaments-en-trop/', 'Des médicaments en trop', ''); mgmap1.addMarker(46.342670, -72.542931, '/programmation/expo-biblio-la-terre-de-demain/', 'Expo biblio - La Terre de demain', ''); mgmap1.addMarker(46.358582, -72.567787, '/programmation/salon-des-sciences-de-la-mauricie/', 'Salon des sciences de la Mauricie', ''); mgmap1.addMarker(46.564102, -72.752571, '/programmation/symposium-des-sciences/', 'Symposium des sciences', ''); mgmap1.addMarker(45.402416, -71.828232, '/programmation/rassemblement-scientifique-de-lestrie-1/', 'Rassemblement scientifique de l&#039;Estrie', ''); mgmap1.addMarker(45.494408, -72.309959, '/programmation/repair-cafe/', 'Repair Café', ''); mgmap1.addMarker(45.380409, -71.928436, '/programmation/cercle-mathematique-de-sherbrooke/', 'Cercle Mathématique de Sherbrooke', ''); mgmap1.addMarker(45.403366, -71.895638, '/programmation/la-preuve-par-limage/', 'La preuve par l’image', ''); mgmap1.addMarker(45.403366, -71.895638, '/programmation/la-preuve-par-limage-1/', 'La preuve par l’image', ''); mgmap1.addMarker(45.397408, -71.896782, '/programmation/soiree-dastronomie-place-de-la-gare-de-sherbrooke/', 'Soirée d&#039;astronomie Place de la Gare de Sherbrooke', ''); mgmap1.addMarker(45.403366, -71.895638, '/programmation/delires-scientifiques-vis-ta-science-autrement-1/', 'Délires scientifiques! Vis ta science autrement.', ''); mgmap1.addMarker(45.394413, -71.928307, '/programmation/atelier-sur-les-mollusques-aquatiques-et-terrestres/', 'Atelier sur les mollusques aquatiques et terrestres', ''); mgmap1.addMarker(45.667953, -73.494850, '/programmation/le-soleil-et-les-changement-climatiques/', 'Le soleil et les changement climatiques', ''); mgmap1.addMarker(45.667953, -73.494850, '/programmation/fabrique-ta-propre-enseigne-neon/', 'Fabrique ta propre enseigne néon', ''); mgmap1.addMarker(45.483768, -73.808022, '/programmation/presentoirs-de-livres-24h-de-science/', 'Présentoirs 24h de science', ''); mgmap1.addMarker(45.517937, -73.608383, '/programmation/activite-stim-avec-des-briques-lego/', 'Activité STIM avec des briques LEGO', ''); mgmap1.addMarker(45.479172, -73.563400, '/programmation/exposition-de-documents-sur-le-theme-de-la-science/', 'Exposition de documents sur le thème de la science', ''); mgmap1.addMarker(45.449303, -73.816498, '/programmation/presentoirs-bibliographies-sur-le-theme-sous-la-terre/', 'Présentoirs/Bibliographies sur le thème &quot;Sous la terre&quot;', ''); mgmap1.addMarker(45.479172, -73.563400, '/programmation/les-circuits-electroniques/', 'Les circuits électroniques', ''); mgmap1.addMarker(45.448582, -73.577957, '/programmation/la-science-abracadabrante-avec-les-scientifines/', 'La science abracadabrante avec les scientifines', ''); mgmap1.addMarker(45.457073, -73.547440, '/programmation/la-science-abracadabrante-avec-les-scientifines-1/', 'La science abracadabrante avec les scientifines', ''); mgmap1.addMarker(45.524872, -73.582474, '/programmation/programmez-une-creature-par-ordinateur/', 'Programmez une créature par ordinateur', ''); mgmap1.addMarker(45.502773, -73.554718, '/programmation/sauvons-leau/', 'Sauvons l&#039;eau !', ''); mgmap1.addMarker(45.557461, -73.672546, '/programmation/partez-en-mission-pour-le-monarque/', 'Partez en mission pour le monarque!', ''); mgmap1.addMarker(45.557461, -73.672546, '/programmation/lindustrie-miniere-ici-la-et-un-peu-partout/', 'L’industrie minière : ici, là et un peu partout!', ''); mgmap1.addMarker(45.509209, -73.568535, '/programmation/les-mathematiques-de-la-magie/', 'Les mathématiques de la magie!', ''); mgmap1.addMarker(45.553364, -73.662636, '/programmation/science-abracadabrante-2/', 'Science abracadabrante', ''); mgmap1.addMarker(45.514069, -73.646317, '/programmation/une-breve-histoire-du-temps/', 'Une brève histoire du temps', ''); mgmap1.addMarker(45.557461, -73.672546, '/programmation/vie-aquatique-des-bouleversements-a-lhorizon/', 'Vie aquatique : des bouleversements à l’horizon?', ''); mgmap1.addMarker(45.505211, -73.550240, '/programmation/forum-sur-le-cancer-du-sein/', 'Forum sur le cancer du sein', ''); mgmap1.addMarker(45.562149, -73.595634, '/programmation/fabrication-de-jouets-ecologiques/', 'Fabrication de jouets écologiques', ''); mgmap1.addMarker(45.441399, -73.758514, '/programmation/journee-internationale-de-lastronomie-24h-de-science/', 'Journée Internationale de l&#039;Astronomie + 24h de science', ''); mgmap1.addMarker(45.505211, -73.550240, '/programmation/les-araignees-de-la-peur-a-la-fascination/', 'Les araignées – De la peur à la fascination', ''); mgmap1.addMarker(45.681114, -73.500977, '/programmation/marais-sans-dessus-dessous/', 'Marais sans dessus dessous', ''); mgmap1.addMarker(45.514450, -73.895958, '/programmation/les-oiseaux-de-retour-chez-eux/', 'Les oiseaux, de retour chez eux', ''); mgmap1.addMarker(45.499691, -73.768173, '/programmation/du-champ-a-la-foret/', 'Du champ à la forêt', ''); mgmap1.addMarker(45.557461, -73.672546, '/programmation/laboratoire-judiciaire/', 'Laboratoire Judiciaire', ''); mgmap1.addMarker(45.501011, -73.615776, '/programmation/la-terre-de-demain-les-maths-peuvent-elles-aider/', 'La Terre de demain : les maths peuvent-elles aider?', ''); mgmap1.addMarker(45.504959, -73.574036, '/programmation/decouvrir-la-chimie-discover-chemistry/', 'Découvrir la chimie! / Discover Chemistry', ''); mgmap1.addMarker(45.557461, -73.672546, '/programmation/sadapter-piece-par-piece/', 'S’adapter pièce par pièce', ''); mgmap1.addMarker(45.557461, -73.672546, '/programmation/visite-guidee-du-pavillon-daccueil-du-parcours-gouin/', 'Visite guidée du pavillon d&#039;accueil du Parcours Gouin', ''); mgmap1.addMarker(45.424202, -73.866859, '/programmation/cinema-en-famille-du-vendredi-big-hero-6/', 'Cinéma en famille du vendredi: Big Hero 6', ''); mgmap1.addMarker(45.581715, -73.544067, '/programmation/deuxieme-vie/', 'Deuxième vie', ''); mgmap1.addMarker(45.440098, -73.691795, '/programmation/apres-midi-technologique/', 'Après-midi technologique', ''); mgmap1.addMarker(45.424202, -73.866859, '/programmation/brico-scientifique-pour-maman/', 'Brico scientifique pour maman!', ''); mgmap1.addMarker(45.445770, -73.651527, '/programmation/activite-scientifique-la-glace-carbonique/', 'Activité scientifique : la glace carbonique!', ''); mgmap1.addMarker(45.547428, -73.598038, '/programmation/decouvertes-litteraires-autour-de-la-science-bricolage/', 'Découvertes littéraires autour de la science', ''); mgmap1.addMarker(45.557617, -73.556946, '/programmation/capturez-des-donnees-pour-lherbier-marie-victorin/', 'Capturez des données pour l&#039;herbier Marie-Victorin', ''); mgmap1.addMarker(45.504467, -73.577385, '/programmation/les-arbres-une-chronique-vivante-de-notre-climat/', 'Les Arbres: Une Chronique Vivante de notre Climat', ''); mgmap1.addMarker(45.595375, -73.523880, '/programmation/deuxieme-vie-1/', 'Deuxième vie !', ''); mgmap1.addMarker(45.557461, -73.672546, '/programmation/quiz-sur-la-biodiversite-urbaine/', 'Quiz sur la biodiversité urbaine', ''); mgmap1.addMarker(45.509354, -73.566826, '/programmation/visite-acoustique-de-la-maison-symphonique-complet/', 'Visite acoustique de la Maison symphonique - COMPLET', ''); mgmap1.addMarker(45.509434, -73.569481, '/programmation/la-vie-serait-elle-dorigine-intraterrestre/', 'La vie serait-elle d&#039;origine intraterrestre ?', ''); mgmap1.addMarker(45.552509, -73.576202, '/programmation/portes-ouvertes-sur-les-sciences-de-la-terre/', 'Portes ouvertes sur les sciences de la terre', ''); mgmap1.addMarker(45.477280, -73.592667, '/programmation/visites-guidees-du-musee-des-ondes-emile-berliner/', 'Visites guidées du Musée des ondes Emile Berliner', ''); mgmap1.addMarker(45.578171, -73.657722, '/programmation/conference-et-observation-astronomique/', 'Conférence et Observation astronomique', ''); mgmap1.addMarker(45.587234, -73.575577, '/programmation/rassemblement-scientifique-de-montreal-2019/', 'Rassemblement scientifique de Montréal 2019', ''); mgmap1.addMarker(45.427792, -75.710930, '/programmation/protegeons-lenvironnement-mais-comment/', 'Protégeons l&#039;environnement... Mais comment ?', ''); mgmap1.addMarker(45.421844, -75.738441, '/programmation/la-realite-virtuelle-au-secours-des-phobies/', 'La réalité virtuelle au secours des phobies', ''); mgmap1.addMarker(45.459194, -75.769730, '/programmation/demonstration-grand-public-dune-cyberattaque/', 'Démonstration grand public d’une cyberattaque', ''); mgmap1.addMarker(45.507301, -75.791344, '/programmation/excursion-mycologique-printaniere/', 'Excursion mycologique printanière', ''); mgmap1.addMarker(45.459835, -75.767059, '/programmation/ma-these-en-180-secondes/', 'Ma Thèse en 180 secondes', ''); mgmap1.addMarker(45.506279, -75.812080, '/programmation/balade-promenons-nous-dans-les-bois/', 'Balade - Promenons-nous dans les bois!', ''); mgmap1.addMarker(45.790928, -75.207451, '/programmation/conference-participative-declic-reinventer-la-foret/', 'Conférence participative Déclic - Réinventer la forêt', ''); mgmap1.addMarker(45.429043, -75.709213, '/programmation/1e-plateforme-wikimedia-autochtone-en-amerique-du-nord/', '1e plateforme Wikimédia autochtone en Amérique du Nord', ''); mgmap1.addMarker(45.421844, -75.738441, '/programmation/les-embouteillages-une-veritable-plaie/', 'Les embouteillages, une véritable plaie !', ''); mgmap1.addMarker(48.571243, -78.109261, '/programmation/rallye-scientifique-avec-les-debrouillards/', 'Rallye scientifique avec les Débrouillards', ''); mgmap1.addMarker(48.141258, -78.120872, '/programmation/rassemblement-scientifique-de-labitibi-temiscamingue/', 'Rassemblement scientifique de l&#039;Abitibi-Témiscamingue', ''); mgmap1.addMarker(48.230759, -79.007927, '/programmation/lastronomie-dhier-daujourdhui-et-de-demain/', 'L&#039;astronomie d&#039;hier, d&#039;aujourd&#039;hui et de demain', ''); mgmap1.addMarker(50.212269, -66.378090, '/programmation/table-de-livres-inventions-et-inventeurs/', 'Table de livres : Inventions et inventeurs!', ''); mgmap1.addMarker(50.212269, -66.378090, '/programmation/club-de-jeux-de-societe-inventions-et-inventeurs/', 'Club de jeux de société : Inventions et inventeurs !', ''); mgmap1.addMarker(50.218819, -66.381821, '/programmation/samedi-debrouillard/', 'Samedi Débrouillard', ''); mgmap1.addMarker(49.913937, -74.366531, '/programmation/observation-du-soleil/', 'Observation du Soleil', ''); mgmap1.addMarker(49.913937, -74.366531, '/programmation/decouvrez-le-planetarium-quasar/', 'Découvrez le planétarium Quasar', ''); mgmap1.addMarker(49.913937, -74.366531, '/programmation/observation-des-crateres-lunaires/', 'Observation des cratères lunaires', ''); mgmap1.addMarker(49.913937, -74.366531, '/programmation/exposition-soleil/', 'Exposition Soleil', ''); mgmap1.addMarker(47.372330, -61.916153, '/programmation/presentation-des-projets-de-recherche-des-finissants/', 'Présentation des projets de recherche des finissants', ''); mgmap1.addMarker(48.042034, -65.465553, '/programmation/festi-oiseaux/', 'Festi-oiseaux', ''); mgmap1.addMarker(46.654709, -71.312904, '/programmation/programme-ton-robot-abeille/', 'Butine ta programmation', ''); mgmap1.addMarker(45.566998, -73.744308, '/programmation/50e-anniversaire-du-premier-pas-sur-la-lune/', '50e anniversaire du premier pas sur la Lune', ''); mgmap1.addMarker(45.603191, -73.659592, '/programmation/soiree-dobservation-du-ciel/', 'Soirée d&#039;observation du ciel', ''); mgmap1.addMarker(45.616543, -73.786652, '/programmation/chasse-aux-bebittes-aquatiques/', 'Chasse aux bébittes aquatiques', ''); mgmap1.addMarker(45.607986, -73.796394, '/programmation/creatures-de-la-nuit-les-chauves-souris/', 'Créatures de la nuit : les chauves-souris', ''); mgmap1.addMarker(45.607986, -73.796394, '/programmation/les-especes-meconnues-et-mal-aimees/', 'Les espèces méconnues et mal-aimées', ''); mgmap1.addMarker(45.540962, -73.718147, '/programmation/bien-differents-genetiquement-dun-continent-a-lautre/', 'Bien différents génétiquement d’un continent à l’autre?', ''); mgmap1.addMarker(45.548340, -73.729912, '/programmation/decouverte-au-bois-chomedey/', 'Découverte au bois Chomedey', ''); mgmap1.addMarker(45.593838, -73.664345, '/programmation/les-roboticiens-de-demain/', 'Les roboticiens de demain', ''); mgmap1.addMarker(45.825657, -73.423653, '/programmation/heure-du-conte-scientifique-avec-gertrud/', 'Heure du conte scientifique avec Gertrüd', ''); mgmap1.addMarker(45.825657, -73.423653, '/programmation/atelier-robotique-pedagogique/', 'Atelier robotique pédagogique', ''); mgmap1.addMarker(45.887955, -73.284454, '/programmation/les-fossiles/', 'Les fossiles', ''); mgmap1.addMarker(45.745262, -73.602577, '/programmation/jeu-dadresse-electrique/', 'Jeu d’adresse électrique', ''); mgmap1.addMarker(46.019421, -73.447014, '/programmation/2050-quand-nous-serons-9-8-milliards-sur-terre/', '2050 : quand nous serons 9,8 milliards sur Terre', ''); mgmap1.addMarker(45.741043, -73.451935, '/programmation/contes-scientifiques/', 'Contes scientifiques', ''); mgmap1.addMarker(45.884178, -73.275085, '/programmation/soiree-dobservation-de-la-lune/', 'Soirée d&#039;observation de la lune', ''); mgmap1.addMarker(45.945377, -73.572586, '/programmation/atelier-jeux-dadresse-electrique/', 'Atelier jeux d’adresse électrique', ''); mgmap1.addMarker(46.118229, -74.600571, '/programmation/storytime-with-tina-special-science/', 'Storytime with Tina, spécial Science !', ''); mgmap1.addMarker(46.118229, -74.600571, '/programmation/livres-de-sciences-a-la-bibliotheque-samuel-ouimet/', 'Livres de sciences à la Bibliothèque Samuel-Ouimet', ''); mgmap1.addMarker(46.193897, -74.630730, '/programmation/livres-de-sciences-a-la-bibliotheque-du-couvent/', 'Livres de sciences à la Bibliothèque du Couvent', ''); mgmap1.addMarker(45.678699, -73.923706, '/programmation/les-merveilles-de-la-nature-en-realite-virtuelle/', 'Les merveilles de la nature en réalité virtuelle', ''); mgmap1.addMarker(45.623287, -74.074249, '/programmation/si-le-ciel-metait-raconte-mythologie-et-astronomie/', 'Si le ciel m&#039;était raconté : mythologie et astronomie', ''); mgmap1.addMarker(45.491627, -73.487740, '/programmation/les-decouvertes-de-melvil-electricite-statique/', 'Les découvertes de Melvil : Électricité statique', ''); mgmap1.addMarker(45.587238, -73.326057, '/programmation/science-abracadabrante/', 'Science abracadabrante', ''); mgmap1.addMarker(45.503334, -73.510292, '/programmation/les-reactions-chimiques/', 'Les réactions chimiques', ''); mgmap1.addMarker(45.503334, -73.510292, '/programmation/exposition-de-livres-thematiques/', 'Exposition de livres thématiques', ''); mgmap1.addMarker(45.775040, -73.359169, '/programmation/mini-spectacle-animaux-magie-et-sciences/', 'Mini-spectacle Animaux, magie et sciences', ''); mgmap1.addMarker(45.415398, -73.498466, '/programmation/brixologie-carnaval/', 'Brixologie : carnaval', ''); mgmap1.addMarker(45.398502, -73.572647, '/programmation/la-vie-sous-leau/', 'La vie sous l&#039;eau', ''); mgmap1.addMarker(45.388672, -73.517868, '/programmation/autour-de-labeille/', 'Autour de l&#039;abeille', ''); mgmap1.addMarker(45.398502, -73.572647, '/programmation/suggestions-du-moment-pour-le-24-heures-de-science/', 'Suggestions du moment - 24 heures de science', ''); mgmap1.addMarker(45.491089, -73.402702, '/programmation/livres-de-sciences-dans-les-bibliotheques-de-longueuil/', 'Livres de sciences dans les bibliothèques de Longueuil', ''); mgmap1.addMarker(45.620934, -72.920532, '/programmation/ca-grouille-dans-le-boise/', 'Ça grouille dans le boisé', ''); mgmap1.addMarker(45.620934, -72.920532, '/programmation/le-retour-des-insectivores-ailes/', 'Le retour des insectivores ailés', ''); mgmap1.addMarker(45.565681, -73.190346, '/programmation/le-monde-de-demain/', 'Le monde de demain', ''); mgmap1.addMarker(45.536758, -73.157784, '/programmation/la-science-a-la-montagne2/', 'La science à la montagne', ''); mgmap1.addMarker(45.361080, -73.479858, '/programmation/roches-et-mineraux/', 'Roches et minéraux', ''); mgmap1.addMarker(45.503254, -73.383682, '/programmation/les-merveilles-de-la-nature-en-realite-virtuelle-1/', 'Les merveilles de la nature en réalité virtuelle', ''); mgmap1.addMarker(45.604462, -73.448830, '/programmation/cap-sur-la-nature/', 'Cap sur la nature', ''); mgmap1.addMarker(45.549053, -73.189178, '/programmation/circuit-exterieur-les-plantes-et-leurs-usages/', 'Circuit extérieur – Les plantes et leurs usages', ''); mgmap1.addMarker(45.549053, -73.189178, '/programmation/conference-horticole/', 'Conférence horticole', ''); mgmap1.addMarker(45.359375, -73.300606, '/programmation/air-et-atmosphere-avec-les-neurones-atomiques/', 'Air et atmosphère avec les Neurones atomiques', ''); mgmap1.addMarker(46.058456, -71.957657, '/programmation/codage-souque-a-la-corde/', 'Codage : Souque à la corde', ''); mgmap1.addMarker(45.881287, -72.484634, '/programmation/la-conquete-de-la-lune/', 'La conquête de la lune', ''); mgmap1.addMarker(45.881287, -72.484634, '/programmation/lumiere-et-laser/', 'Lumière et laser', ''); mgmap1.addMarker(46.327763, -72.503265, '/programmation/la-terre-de-demain/', 'La Terre de demain', ''); mgmap1.addMarker(46.506069, -72.203606, '/programmation/exposition-de-livres-de-jeux-et-de-dvd/', 'Exposition de livres, de jeux et de DVD', ''); mgmap1.addMarker(45.943672, -71.988548, '/programmation/jobserve-les-racines-de-mes-haricots-grimpants/', 'J&#039;observe les racines de mes haricots grimpants !', ''); mgmap1.fitToMarkers(); 
</script>

 

Thanks,

Mel

 

Link to comment
Share on other sites

  • 3 months later...

Are there any plans to officially make this compatible with 3.x? At the moment there's quite a few issues. When editing the field itself, it constantly says error geocoding address. In a page containing the field in the CMS it says the same on save, and it also says "REQUEST DENIED" under the map on load. To actually place a pin requires searching and then focusing off the box, pressing return will save the page but not update the marker.

  • Like 1
Link to comment
Share on other sites

  • 4 weeks later...

Based on the available methods in this module, it seems like the best approach is actually now:

$map = $modules->get('MarkupGoogleMap');
echo $map->getGMapScript();

You can see here: https://github.com/ryancramerdesign/FieldtypeMapMarker/blob/917edef8efe92bf8bdbdff62b66f6eca581ca57e/MarkupGoogleMap.module#L154-L165 that this will return the entore script tag you need, along with your API included.

Of course it would be nice if the module docs mentioned this ?

Link to comment
Share on other sites

  • 5 weeks later...

Hi,

Our problem is that we're making the map marker template from another template via page reference. We've tried to add our own checkbox "show map" but it has proven quite difficult to follow the geotag ON/OFF logic.

I would love to see if someone has figured this out.

TLDR

is there anyway for checking if the map is enabled, or do I have to make my own checkbox logic for it

 

Link to comment
Share on other sites

Hi after upgrading to ProcessWire 3.0.140 and trying to edit the field "mapmarker" from admin i got:

Fatal Error: Uncaught Error: Call to a member function prepend() on null in /var/www/www.designupgrade-test.com/wire/core/Fields.php:1066
Stack trace:
#0 /var/www/www.designupgrade-test.com/wire/modules/Process/ProcessField/ProcessField.module(1412): ProcessWire\Fields->getCompatibleFieldtypes(Object(ProcessWire\Field))
#1 /var/www/www.designupgrade-test.com/wire/core/Wire.php(380): ProcessWire\ProcessField->___buildEditFormBasics()
#2 /var/www/www.designupgrade-test.com/wire/core/WireHooks.php(813): ProcessWire\Wire->_callMethod('___buildEditFor...', Array)
#3 /var/www/www.designupgrade-test.com/wire/core/Wire.php(442): ProcessWire\WireHooks->runHooks(Object(ProcessWire\ProcessField), 'buildEditFormBa...', Array)
#4 /var/www/www.designupgrade-test.com/wire/modules/Process/ProcessField/ProcessField.module(1020): ProcessWire\Wire->__call('buildEditFormBa...', Array)
#5 /var/www/www.designupgrade-test.com/wire/core/Wire.php(380): ProcessWire\ProcessField->___buildEditForm()
#6 /var/www/www.designupgrade-test.com/wire/core/WireHooks.php(813): ProcessWire\Wire->_ca (line 1066 of /var/www/www.designupgrade.com/wire/core/Fields.php)

I also noticed that Compatibility is till 2.7 any chanche to upgrade to 3.0 ?
Does anybody solved in some way that issue?

Link to comment
Share on other sites

  • 4 weeks later...
  • 2 months later...
On 10/17/2018 at 12:10 PM, rst said:

The way I was able to solve it, is you have to create 2 different api's. One for the front end, where you set restrictions to your domain name. And then another for this module where you set the restriction to your server's ip address. Also, make sure that geocoding api is enabled in google console.  Hope this helps.

 

 

Thank you. I was just starting to lose it. One particular client insists on using Google Map instead of Open Street Map and I was getting nowhere. Geocoding wasn't working in the backend and the map wasn't showing on the front although there were no errors. Then I saw this post ^ and enabled the geocoding API in the Google Console.

This is important information for anyone having trouble.

Link to comment
Share on other sites

  • 4 months later...

After upgrade to Processwire 2.8 there is an issue with map markers. It is not compatible and not working correctly like
1) The sub location map is not displaying on admin on chrome it appears on double click but in Morzilla it works fine.
2) The sub location pointer gets reset to the default location even after saving.

Link to comment
Share on other sites

20 hours ago, horst said:

Why "upgrading" today to 2.8?? The current stable Version is 3.0.148, and 2.8 is years old and a dead end branch. It is not further maintained. Please use 3.0.148

The site I'm working on was already upgraded to 2.8. Is the Map maker only compatible for the processwire 3.0.148?

Link to comment
Share on other sites

I've got the maps working on the front end and back end... got a single map with all points, and individual location maps on their pages. API set, account hooked up, everything seems to be awesome. 

I just want to output the street address in addition to the map, so I popped in:

<?php
echo $page->marker->address;    // outputs the address you entered

But when I do I am getting the full address PLUS lat./long and a little [n/a]->address - and want the FORMATTED ADDRESS:

621 W Manchester Blvd, Inglewood, CA 90301 (33.961857, -118.367332, 12) [N/A]->addres

^ that's the formatted_address from Google maps... from the previous 25 pages of historic notes it seems that  there's no easy way to extract this. Any $page->map->address, lat, lon - all returns the same feed, no doubt due to Google changes.

Options currently seem:

- long reverse engineering of the address and JSON parsing, 
- adding a second field and asking the data entry people to enter data twice...
- using another script like Ryan's and coding via the API...

Happy to have gotten this working  aside from this for the sake of getting it to work, and the map with all markers is lovely...but considering Google's charging for clicks? The Google Maps Text Formatter may be the easiest way to accomplish this for sites with light mapping needs. 
 

 

 

screencapture-set4-hollycodes-net-conference-breakout-sessions-2020-05-19-14_30_51.png

Edited by hollyvalero
EDITED: GIVING UP :-)
Link to comment
Share on other sites

  • 2 weeks later...

I'm new to processwire, I'm using ryan's MapMarker module and I've added the api key as well  in module config but still maps are not visible. It is still giving 

Oops! Something went wrong.
This page didn't load Google Maps correctly. See the JavaScript console for technical details.

and in console Google Maps JavaScript API error: RefererNotAllowedMapError.
Please help. Is there anything i'm doing wrong?

Link to comment
Share on other sites

This error indicates that you have not added your site's domain to the allowed referers for your Google Maps API key. See the error documentation here: https://developers.google.com/maps/documentation/javascript/error-messages#deverrorcodes

This didn't use to be required, but Google Maps is constantly becoming more strict with their API usage limits. Go to the cloud console and make sure to add your site's domain to the allowed referers for the key you're using, then it should start working again.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...