• hillvalleytech

    (@hillvalleytech)


    Hi,
    What determines where the map will be zoomed into when it loads? Is there a way to manually set this somewhere in the code?

    I can set the zoom level in the widget settings and that works fine. What I’d like to do is move the focus of the map to the city’s center when it first loads on my page. When I have it zoomed into the level I want it it center’s on a remote location that is not useful.

    I’m pretty good with figuring out javascript or PHP if you can point me in the right direction how to change this.

    Thanks. GREAT plugin btw!

    Chris

    https://www.ads-software.com/plugins/geodirectory/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Paolo

    (@paoltaia)

    Hi,

    I’m not 100% sure, but I don’t think you need to alter any code for this.

    Did you try to just alter a bit Lat and Long coordinates of the default location and zoom correctly?

    That should work…

    Let us know, if it doesn’t I’ll ask Stiofan to dig a little deeper.

    Thanks

    Thread Starter hillvalleytech

    (@hillvalleytech)

    Thanks Paolo,
    Changing the Long and Lat on the Default Location section doesn’t seem to make a difference. My map still centers at the same point.

    Although those setting don’t seem to affect my actual map…I just realized the long/lat on the Default Location screen are plotted to about 300 miles away from my city! That’s MUCH further away from where the center is on the actual map on my page (I only want to move it over one mile to the west).

    I’m using the automatically calculated coords that are generated when I enter my city/state/country.

    Thanks again for your help.

    Plugin Author Paolo

    (@paoltaia)

    Hi,

    I’ve asked to Stiofan to look into this for you and he should be able to give you some hints soon.

    Thx

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Can I change the default center location of map when it loads?’ is closed to new replies.