google map location centering

Home Forums Porto – Responsive HTML5 Template google map location centering

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #10027632
    isharf
    Participant

    Hello,

    my location on google maps is on the extreme left of screen. How can I have it load in the centre of the screen on all devices by default?

    Thanks


    #10027634
    Support2
    Keymaster

    Hello,

    Try using latitude and longitude options at mapMarkers object instead of address. For example, change the current code to:

    // Map Markers
    var mapMarkers = [{
    	latitude: 40.75198,
    	longitude: -73.96978,
    	html: "<strong>New York Office</strong><br>New York, NY 10017",
    	icon: {
    		image: "img/pin.png",
    		iconsize: [26, 46],
    		iconanchor: [12, 46]
    	},
    	popup: true
    }];

    * Change the latitude and longitude values to your address.
    * You can use this website to get latitude and longitude of your address: https://www.latlong.net/

    Please, try that and let us know if you need further assistance.

    Kind Regards,

    Rodrigo.


    #10027652
    isharf
    Participant
    This reply has been marked as private.
    #10027654
    Support2
    Keymaster

    Hello,

    Right. Can you please share with us the map JS code on footer of page you are trying.
    Note that for each device (desktop or mobile) you need reload the page to get the pin centered. If you open the website in a desktop device and then resize the window to a mobile device size, the map pin will not show centered unless you reload the page.

    Kind Regards,

    Rodrigo.


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

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