<p>It's possible that some other JavaScript (unrelated to Smart Map) is throwing an error, and Smart Map never gets a chance to load the map. Loading a dynamic map is intentionally done late in the process, so that it doesn't interfere with other scripts you may have running.</p>

<p>The static map is simply loaded as a remote image, so no JavaScript is required.</p>

CC BY-SA 3.0
2018-03-07T01:49:57.387Z
Darn...just answered the wrong thread. There are indeed js errors:
Eric Snyder
CC BY-SA 3.0
2018-03-07T01:50:38.077Z
/cpresources/smartmap/css/smartmap.css?x=MAzgVq0Oy Failed to load resource: the server responded with a status of 404 (Not Found)
smartmap.js Failed to load resource: the server responded with a status of 404 (Not Found)
smartmap.js Failed to load resource: the server responded with a status of 404 (Not Found)
xx.xx.xx.xx/:73 Uncaught ReferenceError: smartMap is not defined
    at xx.xx.xx.xx/:73
content.js:10 
smartmap.css Failed to load resource: the server responded with a status of 404 (Not Found)
Eric Snyder
CC BY-SA 3.0
2018-03-07T01:55:12.907Z
Is the public `/cpresources` folder writable? Craft needs to copy files there from the backend when the page initially loads.
Lindsey D
CC BY-SA 3.0
2018-03-07T02:03:13.460Z
Using find I cannot find a folder or file named "/cpresources". Where should it be?
Eric Snyder
CC BY-SA 3.0
2018-03-07T04:45:05.667Z
It should be in your `/web` folder. (Or if you've renamed it, then whatever that folder is currently named.)
Lindsey D
CC BY-SA 3.0
2018-03-07T12:39:17.070Z
/craft/app/etc/web or /craft/app/framework/web? Those are the only two web folders I have. Neither contain a folder named /cpresources. Changing both to 777 did not fix the issue.
Eric Snyder
CC BY-SA 3.0
2018-03-05T22:19:07.817Z
2018-03-05T22:19:07.817Z
Lindsey D
<p>I enabled the three API's at Google:</p>
<blockquote>
<p>Google Maps JavaScript API</p>
<p>Google Maps Geocoding API</p>
<p>Google Static Maps API</p>
</blockquote>
<p>I get a static map OK. All I get with the dynamic map is a &quot;Loading Map...&quot;.</p>
<p>My code:</p>
<pre><code>{% for entry in craft.entries.section('groups').limit(5).find() %}
    &lt;li&gt;&lt;a href=&quot;{{ entry.url }}&quot;&gt;{{ entry.title }} , {{ entry.address }}, {{ craft.smartMap.map(entry.address) }}&lt;/a&gt;&lt;/li&gt;
{% endfor %}
</code></pre>

CC BY-SA 3.0
2018-03-05T06:28:56.850Z
Do you get any javascript errors? Those can be illuminating.
Marion Newlevant
CC BY-SA 3.0
2018-03-05T22:16:51.093Z
Echoing what @MarionNewlevant said... Turn on the console, and see if any errors are being displayed there.
Lindsey D
<plugin-smartmap>
Smart Map - Static map displays fine, dynamic map does not
# Smart Map - Static map displays fine, dynamic map does not

(Asked by: username_0 on 2018-03-05)

I enabled the three API's at Google:

Google Maps JavaScript API
Google Maps Geocoding API
Google Static Maps API

I get a static map OK. All I get with the dynamic map is a "Loading Map...".
My code:
{% for entry in craft.entries.section('groups').limit(5).find() %}
    {{ entry.title }} , {{ entry.address }}, {{ craft.smartMap.map(entry.address) }}
{% endfor %}

**Tags:** plugin-smartmap

> **Comments:**
> **username_1**: Do you get any javascript errors? Those can be illuminating.  
> **username_2**: Echoing what @MarionNewlevant said... Turn on the console, and see if any errors are being displayed there.  

---

## 1 answers

### Answer by username_2 on 2018-03-05. Score: 1

It's possible that some other JavaScript (unrelated to Smart Map) is throwing an error, and Smart Map never gets a chance to load the map. Loading a dynamic map is intentionally done late in the process, so that it doesn't interfere with other scripts you may have running.

The static map is simply loaded as a remote image, so no JavaScript is required.

> **Comments:**
> **username_0**: Darn...just answered the wrong thread. There are indeed js errors:  
> **username_0**: /cpresources/smartmap/css/smartmap.css?x=MAzgVq0Oy Failed to load resource: the server responded with a status of 404 (Not Found) smartmap.js Failed to load resource: the server responded with a status of 404 (Not Found) smartmap.js Failed to load resource: the server responded with a status of 404 (Not Found) xx.xx.xx.xx/:73 Uncaught ReferenceError: smartMap is not defined     at xx.xx.xx.xx/:73 content.js:10  smartmap.css Failed to load resource: the server responded with a status of 404 (Not Found)  
> **username_2**: Is the public `/cpresources` folder writable? Craft needs to copy files there from the backend when the page initially loads.  
> **username_0**: Using find I cannot find a folder or file named "/cpresources". Where should it be?  
> **username_2**: It should be in your `/web` folder. (Or if you've renamed it, then whatever that folder is currently named.)  
> **username_0**: /craft/app/etc/web or /craft/app/framework/web? Those are the only two web folders I have. Neither contain a folder named /cpresources. Changing both to 777 did not fix the issue.  

---

