- COREVIAsked on September 25, 2014 at 04:42 PM
I have a google map on my form where users click on the location where an invasive fish was removed and the form translates that to a geolocation. The coding was acquired through this help forum. I haven't done any changes to the code, but now the map will no longer give the option to switch to terrain mode and the zoom controls are gone. This is bad news as users are selecting locations in the ocean which required the terrain feature. Please fix this!Page URL:
- JotForm SupportsteveAnswered on September 25, 2014 at 08:33 PM
I found the earlier thread where this was set up:
The sample GeoMarker page also does not have the terrain option:
If it used to work and now does not, then perhaps Google changed the API from the time this was set up. I'll research this a bit more to see if I can get the terrain option working. Will update this ticket with what I find.
- COREVIAnswered on September 27, 2014 at 01:47 PM
Any update on the Google API? I would appreciate any insight into this as I'm losing data :(
- JotForm SupportKiranAnswered on September 27, 2014 at 05:59 PM
We apologize for the inconvenience caused. Your message has reached Steve and hopefully he is working on the issue and get back to you when he finds some relevant information. Thank you for your patience.
- JotForm SupportsteveAnswered on September 27, 2014 at 09:45 PM
Thanks for the inquiry. I've been looking at the custom solution our colleague created for you previously. It looks like it needs adjustments since Google seems to have changed its map API. I haven't yet had a chance to explore it yet. I'll will check back early next week. We apologize for the inconvenience.
- JotForm SupportsteveAnswered on September 30, 2014 at 05:56 PM
I think I just figured it out. We need to specify the version of Google API we're using. Please update the topmost script tag to the following:
For reference here's where I found the resolution:
Please let us know if this resolves your issue. Also note, I set the default view to HYBRID, which shows the topography of the ocean floor.
You can find a working version here:
- JotForm SupportsteveAnswered on September 30, 2014 at 06:01 PM
Here's a better version of the sample code: http://jsfiddle.net/5ytkx/145/
- COREVIAnswered on October 04, 2014 at 12:19 PM
Thank you so much for your help. I just copied the new code onto my website, but the map is just sitting awkwardly on top of my form, rather than in the form field where it should be. Also the hidden sections seem to be showing. I'll go back to the original version and see if I can work it out, but I wanted to share that. If somebody is looking at this withing the next few minutes it will still be on the wrong version, but then I'll put it back to the old one without the controls until I or someone else fixes it.
EDIT - I took the top script from the first working code and that seems to have worked. I only copied the first script code and left the rest of the form alone.
In the future I'd love tosee if we could add one of those little arrows you press to zoom in on your current location, but right now I'm just happy something is working again.
- ShadaeAnswered on October 04, 2014 at 04:29 PM
On behalf of my colleague, we are happy to hear that the issue is resolved!
To confirm Google Maps is now giving you the desired results in your form?
- JotForm SupportsteveAnswered on October 04, 2014 at 04:54 PM
Yes, I realized after posted that that I had included a debug version of the code. Glad you figured it out.
The only other change you might also want is to update the default view to HYBRID. It's the only one that shows the terrain of the ocean floor, I believe.
update to this, if you like:
You'll find a list of all the options here:
I created a new thread for your other request to add one of those arrows you press to zoom in on your current location. We'll investigate if we can set that up.
- COREVIAnswered on January 05, 2015 at 03:44 PM
Hello, my map is broken again. For some reason the controls disappeared on the map, so I went back to this thread and found the source of the fix and tried to do it on my own. I now have a completely f***** form. I honestly don't even know where to ask for help. Could somebody PLEASE look at my code and see where I messed up? The live form is www.corevi.org/submit.html
- ShadaeAnswered on January 05, 2015 at 04:02 PM
It appears that a part of your code has been cut off during your efforts to copy and paste it. It is not possible to copy and paste that much code in our forums as it may cause it to be cut off as well as it makes it unreadable.
Can you please upload your code to pastebin.com and provide us with the link to it so that we are able to take a look at the issue.
As the code that was provided is cut off, I have removed it from your post to maintain readability of the thread.
- COREVIAnswered on January 05, 2015 at 04:05 PM
Thanks, I am copying the code now. I have a meeting in 55 minutes with the people who use this form so I hope to get it working!
- COREVIAnswered on January 05, 2015 at 04:07 PM
- BenAnswered on January 05, 2015 at 04:39 PM
Thank you for the link.
Upon looking it seems that you had removed the ID which is used to find the element where the map should be:
Mark your DIVE LOCATION on the map!
<div>Mark your DIVE LOCATION on the map!
<div id="googleMap" style="width:100%;height:527px;background:#5A8E4A;">Map</div>
You can see and copy the code from here: http://pastebin.com/DxkwkpRa
Do let us know if you have any further questions.
- COREVIAnswered on January 05, 2015 at 04:43 PM
Thank you! The only problem (related to this thread) is that the controls aren't showing. Do you know the code to add those in?
- BenAnswered on January 05, 2015 at 05:19 PM
You are welcome.
Unfortunately I was not able to find the reason why the controls are not shown. I am not that familiar with Google Maps so that might require some time to find although I have check several forum posts and tried to fix it through CSS, which did not seem to work. The same was with the following js options:
I have also tried including v=3 in the URL of the script and setting the sensor to false, but as mentioned, it did not seem to work.
If we find anything that would work, we will update you through this thread.
- COREVIAnswered on January 06, 2015 at 08:00 AM
I've been playing with it and I can't find anything that works. I'm working with a large range of user groups and many of them don't know how to zoom without the controls so getting this fixed is VERY important. Please let me know as soon as anything is discovered.
- BenAnswered on January 06, 2015 at 09:24 AM
We will update you if we find any updates through the other thread opened in regards to this (http://www.jotform.com/answers/438721), however as this is a full source code implementation with a bit complex modification we can not offer you the same support as if you are using our widgets through unmodified jotform.
Having that said we will still update you in case we end up finding something that would work, but as mentioned due to the complexity and it being source code implementation we can not give it the same priority as if you were using the unmodified jotform.