On my _entry page, I'm trying to get the SmartMap plugin to generate a dynamic map, but it gets stuck on 'Loading Map'
Using this as the code:
{{ craft.smartMap.map(entry.theEventAddress) }}
and the console tells me:
Uncaught SyntaxError: Unexpected token ,
The documentation is a bit vague on this, and it doesn't really tell you how to fix JavaScript errors. Also, I have API keys in the settings.
EDIT
Here's the output as requested. Using the latest version of the plugin. (2.3.1)
<script type="text/javascript">
/*<![CDATA[*/
if (logSmartMap) {console.log("[smartmap-mapcanvas-1] Drawing map...");}
smartMap.createMap("smartmap-mapcanvas-1", {"center":smartMap.coords(-48.876667,-123.393333),"scrollwheel":false});
if (logSmartMap) {console.log("[smartmap-mapcanvas-1.2497.theEventAddress] Drawing marker...");}
smartMap.createMarker("smartmap-mapcanvas-1.2497.theEventAddress", {"mapId":"smartmap-mapcanvas-1","map":smartMap.map["smartmap-mapcanvas-1"],"position":smartMap.coords(,)});
if (logSmartMap) {console.log("[smartmap-mapcanvas-1] Fitting bounds...");}
smartMap.fitBounds("smartmap-mapcanvas-1");
/*]]>*/
</script>
This is the problem line:
smartMap.createMarker("smartmap-mapcanvas-1.2497.theEventAddress", {"mapId":"smartmap-mapcanvas-1","map":smartMap.map["smartmap-mapcanvas-1"],"position":smartMap.coords(,)});
"position":smartMap.coords(,)... Looks like a bug. For your entry with the ID of2497, doestheEventAddresshave coordinates? Or are the latitude & longitude fields blank? – Lindsey D Jan 11 '16 at 02:50