Ability to add Google Maps as a question

Plus d'informations
il y a 8 ans 2 mois #59554 par gacquier
Hi,

I read on This change list page

Changes from 1.90 to 1.91beta (build 9631)
(...)
+New feature: Ability to add Google Maps as a question (parajulik)


Along with some other references to google maps API deals.

However, I could not figure out how to activate this "ability".

Would any one of you know what it's all about ?

Thanks in advance for your awnsers :) !

Connexion ou Créer un compte pour participer à la conversation.

LimeSurvey Partners
Plus d'informations
il y a 8 ans 2 mois #59587 par DenisChenu
:laugh:

I found it now : short text

(in french : texte court)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand .
An error happen ? Before make a new topic : remind the Debug mode .

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 8 ans 1 mois #59820 par gacquier
Great, short text is the place to find it.

For my solution to work, I needed to modify survey_runtime.js to add map.enablegooglebar after the GMAP2 instanciation.

Thanks a lot for helping me !
Géraud

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 8 ans 2 semaines - il y a 8 ans 2 semaines #61762 par transportation_researcher
Hi,

I've been searching all over the web to use this feature and still don't know how to enable it.

I would like to add google maps into a question where respondents can pin point their frequent locations and provide me a reading of the longitude/latitudes of the selected points.

I'm having difficulties trying to utilize this feature and it may be because of my lack of experience using javascript and APIs. Is there documentation that'll show me how to insert the Google Map API script into the advance editing question box and record lat/longs.

Do I find this in Short text? (I checked out the website and don't understand what its used for or how it will help me)

What is GMAP2 instantiation?

Why and where do I modify survey settings to allow for google maps to be embedded in the questions?

For my solution to work, I needed to modify survey_runtime.js to add map.enablegooglebar after the GMAP2 instanciation.


This feature would be very useful for me and any help would be great!
Thanks in Advance
Dernière édition: il y a 8 ans 2 semaines par transportation_researcher.

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 8 ans 2 semaines #61764 par transportation_researcher
I am using Version 1.91 if this needs to be known

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 8 ans 2 semaines #61765 par transportation_researcher
I figured out what short text means in this topic, duh!

I've tried using the map service feature and I'm not getting anything when testing the question. Since I've just figured this out, it may just take me some time to play around with the settings and making sure I have the right plug-ins.

Again any suggestions or hints would be useful.

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 8 ans 2 semaines #61767 par gacquier
Hi transportation researcher !

In the general parameters (the tools button on the upper part of the screen, you will find a place to paste your google maps API key.

Then, create a short text question.
You should find an "advanced parameters" section in the question parameters. In this section, you will find an option like "use map service". Other options let you define the map size, etc... The default place field has to be filled with the defaut LAT/LON position, like 44.8403 2.4609 for example.

I hope this will be helpful.
I am off this week end, don't be surprised to have more help.

Good luck :-)
Another transportation research

PS : the solution I propose dealing with changing some code is just a way to look for a place before placing the pin. I guess it's not usefull in your case.
:)

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 8 ans 1 semaine #61893 par transportation_researcher
Thanks gacquier!

I got the map service working now. The issue was Internet Explorer was not allowing the API to function in a secured site (https://). Everytime I tested the page I got a warning message asking if I want to view content that was delivered securely (e.g. not the Google Map API). Because of habit, I don't read security messages and always just click yes. After reading the warning more carefully and what it means exactly, I gave myself a palm to the forehead.
This may be an issue when I administer the survey to the participants. I may add a message before the question page to tell them to click no to utilize the mapping service.

I would like to follow your direction in changing the code so that participants would be able to add a postal address before placing a pin. Is that pretty easy to do? I've been searching in how to modify the survey_runtime.js and seeing if I can mimic your steps, but I'm not having any luck. If this requires turning off the XSS filter then I would not be able to do so because I'm not a "super administrator". Again thanks for your help!

~lance

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 8 ans 1 semaine #61946 par tpartner
To enable the Google Search in the map:

In /scripts/survey_runtime.js, find this line
map.addControl(new GSmallMapControl());

And add this line right after it
map.enableGoogleBar();

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
Les utilisateur(s) suivant ont remercié: mfpereira

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 6 ans 10 mois #83669 par jmorant
Hi everybody,

This is an old post but I fits quite well to what I'm looking for.

I want to enable a search field to the map so I can write the address I want to be geocoded. I'm working in a project in which we use limesurvey through Android Tablets and it's quite difficult to navegate through the map without this "search field".

I'm trying to add the line of code that "tpartner" said but I can't find :
map.addControl(new GSmallMapControl());
in /scripts/survey_runtime.js

I'm using Limesurvey 1.92+.

Thank you so much.

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 6 ans 10 mois #83671 par gacquier
Our installation was on Version 1.91RC6 Build 9986...

Not sure if it's the same solution in later versions...

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 6 ans 10 mois - il y a 6 ans 10 mois #83683 par tpartner
As far as I know, for V3 of the maps API, there is no googleBar available.

Some insight here - code.google.com/p/gmaps-api-v3-googlebar/

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
Dernière édition: il y a 6 ans 10 mois par tpartner.

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 6 ans 2 mois #94561 par mfpereira
I have the same problem.

I don't find the line.

Thanks

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 6 ans 2 mois #94572 par tpartner
As mentioned, this is not available with V3 of the maps API.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 6 ans 2 mois #94681 par mfpereira
Ok sorry.

So I can't add that option to my survey?
If a could switch the information from lat and long to the zip code it would be useful.

Do you know how I can do that?

Many thanks

Connexion ou Créer un compte pour participer à la conversation.

Commencez dès maintenant !

Créez simplement un compte et commencez à utiliser LimeSurvey dès aujourd'hui.

Inscrivez-vous maintenant

Inscrivez-vous à notre Newsletter!