keita-makino / qualtrics-map Goto Github PK
View Code? Open in Web Editor NEWGoogle Maps integration into Qualtrics.
License: MIT License
Google Maps integration into Qualtrics.
License: MIT License
I've trying to capture the location when someone enters there location using the address box and/or dropping the pin. Right now if they drop a pin the data gets collected however if they type in an address it doesn't work. Also the map that is displayed is zoomed in too far - is there a way to change this as well as where the map is centered to? Please could you help point me in the right direction.
Hi! I used an older version of your code to embed a map (in 2021 and 22), but struggling with the latest version. I think part of the issue might be that Qualtrics has also updated? Anyway, I'm trying to customize where the map default view is (ideally I'd like it to show the state of Montana). The directions are a little different than they were before (e.g. do you still have to convert the bundle file?). I'm not at all familiar with Javascript (beyond working with the code you provided). Thanks!
Hi @keita-makino ,
I have a query. Is it possible to add my location button in the UI so that participant does not have to scroll to find their location (as we already know that the less complexity in the survey, better it is)?
This way participants will be able to start automatically from their home location and select the point.
Please let me know if it is doable with an easy fix or code replacement in bundle script.
Hi. First, thank you so much for the code and efforts! I have followed your instructions very carefully but run into a persistent issue.
In the "Qualtrics Survey Settings" section of your directions, you note in step 4 to change the file to bundle.js from the bundle.txt extension. I can rename the file but cannot change the file type. If I convert the file prior to uploading, it simply opens as an HTML page that navigates me away from the Qualtrics files library.
Is there a version of the JavaScript available that would allow me to c/p in the JavaScript edit field of the question under the "addOnload"?
I need a map to open where respondents can simply zoom/move the map to select a single location in the city where data is being collected. Once the location is selected, I want it to save by clicking "next" and have that discreet location associate with the other survey items.
Thank you again!
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates are currently rate-limited. Click on a checkbox below to force their creation now.
@babel/cli
, @babel/core
, @babel/preset-env
, @babel/preset-react
, @babel/preset-typescript
)These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
@types/react
, @types/react-dom
, eslint-plugin-react-hooks
, react
, react-dom
)@typescript-eslint/eslint-plugin
, @typescript-eslint/parser
)package.json
@emotion/react ^11.11.4
@emotion/styled ^11.11.0
@mapbox/mapbox-sdk ^0.14.0
assert ^2.1.0
browserify-zlib ^0.2.0
buffer ^6.0.3
crypto-browserify ^3.12.0
https-browserify ^1.0.0
os-browserify ^0.3.0
path-browserify ^1.0.1
stream-browserify ^3.0.0
stream-http ^3.2.0
ts-node-dev ^2.0.0
webpack-merge ^5.10.0
@babel/cli 7.23.9
@babel/core 7.24.0
@babel/preset-env 7.24.0
@babel/preset-react 7.23.3
@babel/preset-typescript 7.23.3
@mui/material 5.15.11
@types/mapbox__mapbox-sdk ^0.14.0
@types/mapbox-gl ^3.1.0
@types/node ^20.11.24
@types/react 18.2.61
@types/react-dom 18.2.19
@typescript-eslint/eslint-plugin 7.1.0
@typescript-eslint/parser 7.1.0
babel-eslint 10.1.0
babel-loader 9.1.3
compression-webpack-plugin 11.1.0
core-js 3.36.0
css-loader 6.10.0
eslint 8.57.0
eslint-config-prettier 9.1.0
eslint-config-react-app 7.0.1
eslint-plugin-flowtype 8.0.3
eslint-plugin-import 2.29.1
eslint-plugin-jsx-a11y 6.8.0
eslint-plugin-prettier 5.1.3
eslint-plugin-react 7.33.2
eslint-plugin-react-hooks 4.6.0
framer-motion 11.0.8
html-webpack-plugin 5.6.0
husky 9.0.11
license-checker 25.0.1
lint-staged 15.2.2
mapbox-gl ^3.1.2
prettier 3.2.5
process ^0.11.10
react ^18.2.0
react-dom 18.2.0
react-hook-geolocation 1.1.0
react-tracked ^1.7.11
react-use 17.5.0
style-loader 3.3.4
terser-webpack-plugin ^5.3.10
ts-loader ^9.5.1
typescript 5.3.3
webpack 5.90.3
webpack-bundle-analyzer 4.10.1
webpack-cli 5.1.4
webpack-dev-server 5.0.2
Hi I am trying to run the map in Qualtrics. But it doesn't work. Could you help me with this issue? Do I need to install dependencies first? I am not a coder any help would be appreciated. Thank you!
Hello,
Many thanks for this library. Unfortunately, I receive the following error:
This site overrides Array.from() with an implementation that doesn't support iterables, which could cause Google Maps JavaScript API v3 to not work correctly.
Has anyone else encountered this error and found a way to circumvent it?
Many thanks.
I can't automatically get the location when dragging the pin on the map.
This happens when a user is redirected to the section due to an incomplete or invalid answer.
Hi @keita-makino
I cannot thank you enough for providing the scripts.
I just have a small query. Since I have no prior knowledge of Java and HTML, I am finding it hard to fix the starting point of the map. Right now, it starts from UC Davis but I want it to start from Tennessee.
I have no clue which code to edit to achieve this and need assistance from you. Please guide me on the appropriate file or script to look for to do this.
hi there.
So.... did the step by step setup.
Map and the two form fields show (w my lat long) in the Look&Feel and in the question preview.
They don't show in the survey preview or in published survey. Only the question text shows -- no form fields, no map.
I tried Chrome, Edge, Firefox.
The console actually shows an error: "SE API Error: ReferenceError: mapRender is not defined"
Again, the question preview works.... just not the survey preview or published version.
Any ideas?
Hello,
first, thank you for this, it's very handy!
I am not a java programmer, so I'm struggling to make a couple of modifications.
I am trying to get participants to select locations that are in the ocean, I would like to get the lat and lon from the map instead of an address. How should I modify the script?
Also, how can I change the default starting location?
Thanks again,
K
Thanks for creating and sharing this code! Really helpful for a project I'm working on. I noticed that satellite view doesn't seem to work. I've also changed the zoom setting to get a broader view of the map initially but now when you enter an address, it doesn't zoom into it. I'd like to be able to offer satellite view for my respondents and have automatic zoom for a searched location.
Your code exposes the accesstoken at the front-end. Which is super duper bad.
The accesstoken is equivalent to a password. Someone could just take it, use it elsewhere and youโll have to pay the charges.
Strongly recommend updating your code.
setCenter
on new marker that is far from the current oneSo, the map code is working great in Qualtrics - thanks! But, the autocomplete is not location-aware. The address within the map area often comes up low down in results until the full address is typed in (see picture - second result should be first). I know there are bounding options for autocomplete that can address this, but I can't decipher the javascript to add them.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.