WordPress.org

Ready to get started?Download WordPress

Forums

Gwebpro Store Locator
[resolved] Map Zoom (6 posts)

  1. Yukon Cornelius
    Member
    Posted 5 months ago #

    Is there a way to change the zoom for a location? When i find a location, the map is fully zoomed in, but i would prefer it if it was zoomed out enough to see the surrounding area. Am i missing a setting, or is this how it has to be?

    Thanks. Great plugin BTW!

    https://wordpress.org/plugins/gwebpro-store-locator/

  2. Jas Saran
    Member
    Plugin Author

    Posted 5 months ago #

    Hello,

    Specific zoom level for locations are not available in this plugin. If you want a customized version of this plugin, Please mail us in our support with your specification.

    Thanks,
    Team G Web Pro

  3. wpkod.com
    Member
    Posted 4 months ago #

    Hi Yukon,

    To change general zoom level, edit gwebpro-store-locator-frontend.php

    function initialize(lat,long)
    	{
    		var latlng = new google.maps.LatLng(lat,long);
    		var myOptions = {
    			zoom: 13,

    You can set your general zoom level @line41

    BUT to change the zoom level at the result map view, you have to add a line of code to gwebpro-store-locator-frontend.php file.

    function placeStores(stores)
    	{
    		for (i = 0; i < stores.length; i++) {
    			var position = new google.maps.LatLng(stores[i][0], stores[i][1]);
    			bounds.extend(position);
    			var markerOptions = {
    				position: position,
    				map: map,
    				animation: google.maps.Animation.DROP
    			}
    			marker = new google.maps.Marker(markerOptions);
    			markers.push(marker);
    			map.fitBounds(bounds);
    			map.setZoom(16);
        		map.panToBounds(bounds);

    Add this line of code to @line86

    map.setZoom(16);

    Best regards,
    Good plugin but need some improvements.

  4. Yukon Cornelius
    Member
    Posted 3 months ago #

    this is great. thanks for your help!

  5. Yukon Cornelius
    Member
    Posted 3 months ago #

    @wpkod.com don't suppose you know how to disable scrollwheel...?

  6. Yukon Cornelius
    Member
    Posted 3 months ago #

    i answered this here. thx

Reply

You must log in to post.

About this Plugin

About this Topic