Jump to content

Map Marker Map

Recommended Posts

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


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.


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


Share this post

Link to post
Share on other sites

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?


Share this post

Link to post
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"

What should I do?

Share this post

Link to post
Share on other sites


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.

Share this post

Link to post
Share on other sites

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

Share this post

Link to post
Share on other sites


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. "


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

<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(); 





Share this post

Link to post
Share on other sites

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

Share this post

Link to post
Share on other sites

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 🙂

Share this post

Link to post
Share on other sites


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.


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


Share this post

Link to post
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?

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By eelkenet
      Hi! I've created a small Inputfield module called InputfieldFloatRange which allows you to use an HTML5 <input type="range" ../> slider as an InputField. I needed something like this for a project where the client needs to be able to tweak this value more based on 'a feeling' than just entering a boring old number. Maybe more people can use this so I'm hereby releasing it into the wild.  
      What is it?
      The missing range slider Inputfield for Processwire. 
      What does it do?
      This module extends InputfieldFloat and allows you to use HTML5 range sliders for number fields in your templates.
      It includes a visible and editable value field, to override/tweak the value if required.  
      Min/max values Precision (number of decimals) Steps (Read more) Manual override of the selected value (will still adhere to the rules above) Usage
      Clone / zip repo Install FieldtypeFloatRange, this automatically installs the Inputfield Create new field of type `Float (range)` or convert an existing `Float`, `Integer` or `Text` field. To render the field's value simply echo `$page->field` Demo
      A field with Min=0, Max=1, Step=0.2, Precision=2

      Field with settings Min=0, Max=200, Step=0.25, Precision=2

      Make the display-field's size configurable (will use the Input Size field setting)  Hopefully become redundant If it's usable for others I'll add it to the Modules list  
      - Fix issue where setting the step value to an empty value created problem with validation
      - Make the display-field optional 
      - Initial release
    • By Robin S
      Another little admin helper module...
      Template Field Widths
      Adds a "Field widths" field to Edit Template that allows you to quickly set the widths of inputfields in the template.

      When setting up a new template or trying out different field layouts I find it a bit slow and tedious to have to open each field individually in a modal just to set the width. This module speeds up the process.
      Install the Template Field Widths module.
      Config options
      You can set the default presentation of the "Field widths" field to collapsed or open. Field widths entered into the Template Field Widths inputfield are only applied if the Edit Template form is submitted with the Template Field Widths inputfield in an opened state. "Collapsed" is the recommended setting if you think you might also use core inputs for setting field widths in a template context. You can choose Name or Label as the primary identifier shown for the field. The unchosen alternative will become the title attribute shown on hover. You can choose to show the original field width next to the template context field width.  
    • By adrian
      Tracy Debugger for ProcessWire
      The ultimate “swiss army knife” debugging and development tool for the ProcessWire CMF/CMS

      Integrates and extends Nette's Tracy debugging tool and adds 35+ custom tools designed for effective ProcessWire debugging and lightning fast development
      The most comprehensive set of instructions and examples is available at: https://adrianbj.github.io/TracyDebugger
      Modules Directory: http://modules.processwire.com/modules/tracy-debugger/
      Github: https://github.com/adrianbj/TracyDebugger
      A big thanks to @tpr for introducing me to Tracy and for the idea for this module and for significant feedback, testing, and feature suggestions.
    • By adrian
      This module allows you to automatically rename file (including image) uploads according to a configurable format
      This module lets you define as many rules as you need to determine how uploaded files will be named and you can have different rules for different pages, templates, fields, and file extensions, or one rule for all uploads. Renaming works for files uploaded via the admin interface and also via the API, including images added from remote URLs.   Github: https://github.com/adrianbj/CustomUploadNames
      Modules Directory: http://modules.processwire.com/modules/process-custom-upload-names/
      Renaming Rules
      The module config allows you to set an unlimited number of Rename Rules. You can define rules to specific fields, templates, pages, and file extensions. If a rule option is left blank, the rule with be applied to all fields/templates/pages/extensions. Leave Filename Format blank to prevent renaming for a specific field/template/page combo, overriding a more general rule. Rules are processed in order, so put more specific rules before more general ones. You can drag to change the order of rules as needed. The following variables can be used in the filename format: $page, $template, $field, and $file. For some of these (eg. $field->description), if they haven't been filled out and saved prior to uploading the image, renaming won't occur on upload, but will happen on page save (could be an issue if image has already been inserted into RTE/HTML field before page save). Some examples: $page->title mysite-{$template->name}-images $field->label $file->description {$page->name}-{$file->filesize}-kb prefix-[Y-m-d_H-i-s]-suffix (anything inside square brackets is is considered to be a PHP date format for the current date/time) randstring[n] (where n is the number of characters you want in the string) ### (custom number mask, eg. 001 if more than one image with same name on a page. This is an enhanced version of the automatic addition of numbers if required) If 'Rename on Save' is checked files will be renamed again each time a page is saved (admin or front-end via API). WARNING: this setting will break any direct links to the old filename, which is particularly relevant for images inserted into RTE/HTML fields. The Filename Format can be defined using plain text and PW $page variable, for example: mysite-{$page->path} You can preserve the uploaded filename for certain rules. This will allow you to set a general renaming rule for your entire site, but then add a rule for a specific page/template/field that does not rename the uploaded file. Just simply build the rule, but leave the Filename Format field empty. You can specify an optional character limit (to nearest whole word) for the length of the filename - useful if you are using $page->path, $path->name etc and have very long page names - eg. news articles, publication titles etc. NOTE - if you are using ProcessWire's webp features, be sure to use the useSrcExt because if you have jpg and png files on the same page and your rename rules result in the same name, you need to maintain the src extension so they are kept as separate files.
      $config->webpOptions = array(     'useSrcExt' => false, // Use source file extension in webp filename? (file.jpg.webp rather than file.webp) ); Acknowledgments
      The module config settings make use of code from Pete's EmailToPage module and the renaming function is based on this code from Ryan: http://processwire.com/talk/topic/3299-ability-to-define-convention-for-image-and-file-upload-names/?p=32623 (also see this post for his thoughts on file renaming and why it is the lazy way out - worth a read before deciding to use this module). 
      This should not be needed on most sites, but I work with lots of sites that host PDFs and photos/vectors that are available for download and I have always renamed the files on upload because clients will often upload files with horrible meaningless filenames like:
      Final ReportV6 web version for John Feb 23.PDF

  • Create New...