Google Map not appearing as expected

Home Forums Porto – Responsive HTML5 Template Google Map not appearing as expected

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #10005537
    cozloz88
    Participant

    These are the coordinates that I want the map centered on. When I tried replacing the coordinates in the given js script, the map pin doesn’t appear. I am using the basic contact-us form.

    1.283211, 103.845382


    #10005553
    Support
    Keymaster

    Hello, can you please make sure you have set the correct initial map location as well (initLatitude and initLongitude )?

    More information here:

    How to change the map location

    Please send me the URL if you need further help 🙂

    Kind Regards,

    Jonas


    #10005562
    cozloz88
    Participant

    Hi, thank you for your reply! This is the website: http://delvacode.com/jc/contact-us.php
    The position the map is centered on is correct, just that the map pin is not appearing. Here is the js script.

    // Map Markers
    			var mapMarkers = [{
    				address: "218 S Bridge Rd, 058767",
    				html: "<strong>Masjid Jamae</strong><br><br><a href='#' onclick='mapCenterAt({latitude: 1.283239, longitude: 103.845366, zoom: 16}, event)'>[+] zoom here</a>",
    				icon: {
    					image: "img/pin.png",
    					iconsize: [36, 46],
    					iconanchor: [12, 46]
    				}
    			}];
    
    			// Map Extended Settings
    			var mapSettings = {
    				controls: {
    					panControl: true,
    					zoomControl: true,
    					mapTypeControl: true,
    					scaleControl: true,
    					streetViewControl: true,
    					overviewMapControl: true
    				},
    				scrollwheel: false,
    				markers: mapMarkers,
    				latitude: "1.283239",
    				longitude: "103.845366",
    				zoom: 18
    			};
    
    			var map = $("#googlemaps").gMap(mapSettings),
    				mapRef = $("#googlemaps").data('gMap.reference');
    
    			// Map Center At
    			var mapCenterAt = function(options, e) {
    				e.preventDefault();
    				$("#googlemaps").gMap("centerAt", options);
    			}
    

    #10005574
    Support
    Keymaster
    This reply has been marked as private.
    #10005580
    cozloz88
    Participant

    Thank you Jonas! It works now!


Viewing 5 posts - 1 through 5 (of 5 total)

This topic is marked as "RESOLVED" and can not rceive new replies.