Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4018) - 28 March 2024

Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

Code to generate Google map not working

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

Post Reply
RayProudfoot
Posts: 3374
Joined: Wed 06 May 2009 6:29 pm
Weather Station: Davis VP2 with Daytime FARS
Operating System: Windows XP SP3
Location: Cheadle Hulme, Cheshire, England
Contact:

Code to generate Google map not working

Post by RayProudfoot »

For some time now the small Google map I have embedded in my website is not displaying. www.cheadlehulmeweather.co.uk

I have tried using a different source the idea being to centre my house on the map. I've tried geo-maps.net and it even allowed me to enter my full address. It then generates the code for you to embed in the indexT.html file.

Despite doing this the map still doesn't show. I'm no expert on these things so if anyone could assist I'd be very grateful.

Here is the code I'm using...

<div id="map_canvas_custom_20935" style="width:300px; height:250px" ></div>
<script type="text/javascript">
(function(d, t) {var g = d.createElement(t),s = d.getElementsByTagName(t)[0];
g.src = "http://geo-maps.net/en/maps/20935";
s.parentNode.insertBefore(g, s);}(document, "script"));</script>
<a class="geomap_link_20935" style="font:8px Arial;text-decoration:none;color:#5C5C5C;text-align: right; display: block; width: 300px;" href="http://geo-maps.net/en">geo-maps.net</a>
<!-- Do not change code! -->
Cheers,
Ray, Cheshire.

Image
Mapantz
Posts: 1778
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: Code to generate Google map not working

Post by Mapantz »

Try this, Ray

Code: Select all

<div id="map_canvas_custom_20943" style="width:250px; height:300px" ></div>
<script type="text/javascript">
(function(d, t) {var g = d.createElement(t),s = d.getElementsByTagName(t)[0];
   g.src = "http://geo-maps.net/en/maps/20943.js?point=SK8+6NZ%2C+Stockport%2C+Stockport%2C+United+Kingdom";
   s.parentNode.insertBefore(g, s);}(document, "script"));</script>
<a class="geomap_link_20943" style="font:8px Arial;text-decoration:none;color:#5C5C5C;text-align: right; display: block; width: 250px;" href="http://geo-maps.net/en">geo-maps.net</a>
<!-- Do not change code! -->
Image
RayProudfoot
Posts: 3374
Joined: Wed 06 May 2009 6:29 pm
Weather Station: Davis VP2 with Daytime FARS
Operating System: Windows XP SP3
Location: Cheadle Hulme, Cheshire, England
Contact:

Re: Code to generate Google map not working

Post by RayProudfoot »

Thanks Mapantz, that did the trick. Looking at the differences it seems the line g.src wasn't correct in mine but I have no idea why. I just copied the code the site generated.
Cheers,
Ray, Cheshire.

Image
Post Reply