Streaming live at 10am (PST)

Custom Map JS Error


#1

Getting an error from the javascript for my custom map. I have a separate javascript file that's being referenced because it has too many characters for Webflow.

The error I'm getting is "Uncaught SyntaxError: Unexpected Identifier" on Line 19 of the code, but I can't find an error in the javascript. The error is causing my map to not show up at all on the published site.

Here is the link to the javascript file, for reference.


#2

Hi @jordanshotwell, a link to the published site would be really helpful to zoom in to the code that is raising the exception. Could you share that? http://help.webflow.com/faq/how-do-i-share-my-sites-read-only-link


#3

Read only link is here: https://preview.webflow.com/preview/melstoffee?preview=0a391403bbeca663d08f526e4bce9f6d


#4

Any code ninjas have any feedback or ideas on how to fix this? @cyberdave @brryant @bart @bartekkustra @sabanna @Waldo


#5

Hi there,

I am not a code ninjas :slightly_smiling: but it might help

  1. for map.js:19, see line 16, guess it needs a comma after True
  2. for melstoffee.webflow.io:149, see line 148, guess it miss a )
  3. for melstoffee.webflow.io:163, , guess it has wrong double quote

Cheers


#6
	var mapOptions = {

	     // How zoomed in you want the map to start at (always required)

                zoom: 7,
                scrollwheel: false,
	    disableDefaultUI: true, <----------- COMMA NEEDED
                // The latitude and longitude to center the map (always required)

                center: new google.maps.LatLng(42.523991, -84.5322054), // Mason, MI

#7