Google Maps

9 replies · opened Jul 18, 2019

Jjsb007Jul 18, 2019

Hello, I have followed all the steps. However the google map does not appear. Can you assist?

I replaced the google key with "my key" as I just dont want others to see it. based on the attachment - have I done it correctly

Jjsb007Jul 18, 2019

<!-- External JavaScripts
============================================= -->
<script src="../js/jquery.js"></script>
<script src="../js/plugins.js"></script>

&lt;!-- Google Map JavaScripts
============================================= --&gt;
&lt;script src="https://maps.google.com/maps/api/js?key=AIzaSyBHpvaiACe4pbbWNPG7cR12jny9AHT****" width="600" height="450" frameborder="0" style="border:0" allowfullscreen&gt;&lt;/iframe&gt;"&gt;&lt;/script&gt;
&lt;script src="../js/jquery.gmap.js"&gt;&lt;/script&gt;


&lt;!-- Footer Scripts
============================================= --&gt;
&lt;script src="../js/functions.js"&gt;&lt;/script&gt;

&lt;script&gt;

&lt;div id="google-map1" style="height: 250px;" class="gmap"&gt;&lt;/div&gt;
	jQuery(window).on( 'load', function(){

	
		// Google Map
		jQuery('#headquarters-map').gMap({
			address: '15 Gateway Blvd, Brampton, Ontario',
			maptype: 'ROADMAP',
			zoom: 14,
			markers: [
				{
					address: "15 Gateway Blvd, Brampton, Ontario",
					html: "15 Gateway Blvd, Brampton, Ontario",
					icon: {
						image: "images/icons/map-icon-red.png",
						iconsize: [32, 32],
						iconanchor: [14,44]
					}
				}
			],
			doubleclickzoom: false,
			controls: {
				panControl: false,
				zoomControl: false,
				mapTypeControl: false,
				scaleControl: false,
				streetViewControl: false,
				overviewMapControl: false
			},
			styles: [{"featureType":"all","elementType":"labels.text.fill","stylers":[{"saturation":36},{"color":"#000000"},{"lightness":40}]},{"featureType":"all","elementType":"labels.text.stroke","stylers":[{"visibility":"on"},{"color":"#000000"},{"lightness":16}]},{"featureType":"all","elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"featureType":"administrative","elementType":"geometry.fill","stylers":[{"color":"#000000"},{"lightness":20}]},{"featureType":"administrative","elementType":"geometry.stroke","stylers":[{"color":"#000000"},{"lightness":17},{"weight":1.2}]},{"featureType":"administrative","elementType":"labels","stylers":[{"visibility":"off"}]},{"featureType":"administrative.country","elementType":"all","stylers":[{"visibility":"simplified"}]},{"featureType":"administrative.country","elementType":"geometry","stylers":[{"visibility":"simplified"}]},{"featureType":"administrative.country","elementType":"labels.text","stylers":[{"visibility":"simplified"}]},{"featureType":"administrative.province","elementType":"all","stylers":[{"visibility":"off"}]},{"featureType":"administrative.locality","elementType":"all","stylers":[{"visibility":"simplified"},{"saturation":"-100"},{"lightness":"30"}]},{"featureType":"administrative.neighborhood","elementType":"all","stylers":[{"visibility":"off"}]},{"featureType":"administrative.land_parcel","elementType":"all","stylers":[{"visibility":"off"}]},{"featureType":"landscape","elementType":"all","stylers":[{"visibility":"simplified"},{"gamma":"0.00"},{"lightness":"74"}]},{"featureType":"landscape","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":20}]},{"featureType":"landscape.man_made","elementType":"all","stylers":[{"lightness":"3"}]},{"featureType":"poi","elementType":"all","stylers":[{"visibility":"off"}]},{"featureType":"poi","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":21}]},{"featureType":"road","elementType":"geometry","stylers":[{"visibility":"simplified"}]},{"featureType":"road.highway","elementType":"geometry.fill","stylers":[{"color":"#000000"},{"lightness":17}]},{"featureType":"road.highway","elementType":"geometry.stroke","stylers":[{"color":"#000000"},{"lightness":29},{"weight":0.2}]},{"featureType":"road.arterial","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":18}]},{"featureType":"road.local","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":16}]},{"featureType":"transit","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":19}]},{"featureType":"water","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":17}]}]
		});

	});

&lt;/script&gt;

</body>
</html>

SSemicolon WebSTAFFJul 19, 2019

Hello,

This appears to be an issue with the API Keys and the permissions assigned to it. It appears that some of the Google Map APIs have not been enabled in your API Console. Make sure that you have enabled the Maps JavaScript API, Maps Static API, Geolocation API, Places API and Geocoding API.

This should definitely fix your issue. Hope this Helps!

Additionally, if the error persists, you can check more details in your Browser's Developer Console.

Let us know if we can help you with anything else or if you find any further issues.

Jjsb007Jul 19, 2019

I Have enabled the above. I will test and advise further

Jjsb007Jul 19, 2019

Hello that did not solve the problem. I have enabled the APIs but still no map.

Did I put the following in the wrong spot ? <div id="google-map1" style="height: 250px;" class="gmap"></div> I put that right before the jQuery(window).on( ‘load’, function(){

Further with the one page HMTL - I find in all 3 different browsers - i get the 3 dots (waiting to load) it takes a while. How do I fix this.

SSemicolon WebSTAFFJul 19, 2019

Hello,

Please provide us with a Live URL so that we can check out the exact issue and provide you with more assistance on this. Thanks for your Patience.

Meanwhile, do let us know if we can help you with anything else or if you find any further issues with Canvas.

SSemicolon WebSTAFFJul 21, 2019

Hello,

There is an error in your Code! The following code is present inside your Google Maps JS Code which is causing the issue:

Please make sure that you check your Browser's Developer Console to check if there are any Conflicts with the JS Codes.

This should definitely fix the issue. Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

Jjsb007Jul 21, 2019

Your Support is amazing. Thank you - and that Worked.

Please let me know if new products you publish in the future !

SSemicolon WebSTAFFJul 22, 2019

Hello,

Thank You so much for the Kind Words! :) Glad that your issues were resolved.

Do let us know if we can help you with anything else or if you find any further issues with Canvas.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard