display satellite view by default

This topic contains 41 replies, has 3 voices, and was last updated by  Kor 4 years, 11 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #487013

    John Marston
    Full Member
    Post count: 170
    This reply has been marked as private.
    #487038

    Kor
    Moderator
    Post count: 16516

    Hi John,

    Thanks for your patience. I’ve just consulted with a developer and he suggested that you insert the custom php code below into your Website. This would force the default map to “Satellite View”. For the existing listings, you can export the listings and change the settings over there. Then, reimport it into back into your Website.

    function gd_snippet_170519_map_params( $params, $map_args ) {
    	if ( $params['map_type'] == 'post' ) {
    		$params['maptype'] = 'SATELLITE';
    	}
    
    	return $params;
    }
    add_filter( 'geodir_map_params', 'gd_snippet_170519_map_params', 10, 2 );
    #487045

    John Marston
    Full Member
    Post count: 170

    This is a very interesting idea but I can’t believe there isn’t a way to just simply change the default view to satellite view is this coming from the top? Users start to add sites will they automatically be satellite view? Or do they have to change them to satellite view? The default will always be a road map? Sounds like there’s no way to change the default to satellite.

    #487235

    John Marston
    Full Member
    Post count: 170
    This reply has been marked as private.
    #487238

    Kor
    Moderator
    Post count: 16516

    Hi John Marston,

    Thanks for your reply. Kindly install the “Code Snippet” plugin and then run the script that I’ve shared earlier. Let us know once you’ve done that and I’ll guide you further adjusting the existing maps into satellite view.

    #487348

    John Marston
    Full Member
    Post count: 170
    This reply has been marked as private.
    #487371

    Kor
    Moderator
    Post count: 16516

    Hi John,

    Thanks for your reply. If you compare the code from your screenshot with the code that I’ve provided, you’ve left out some of the words in the end. Could you make sure that you’ve copied everything and pasted it in correctly?

    #487610

    John Marston
    Full Member
    Post count: 170
    This reply has been marked as private.
    #487758

    Kor
    Moderator
    Post count: 16516

    Hi John Marston,

    Thanks for your reply. Could you now try inserting a new listing and see if it selects the “Satellite” view by default?

    #487834

    John Marston
    Full Member
    Post count: 170
    This reply has been marked as private.
    #487871

    John Marston
    Full Member
    Post count: 170

    We ended up making a code snippet with this code which successfully changed the default to sattelite view

    
    function gd_snippet_170519_map_params( $params, $map_args ) {
    	if ( $params['map_type'] == 'post' ) {
    		$params['maptype'] = 'SATELLITE';
    	}
    
    	return $params;
    }
    add_filter( 'geodir_map_params', 'gd_snippet_170519_map_params', 10, 2 );
    
    #488078

    Kor
    Moderator
    Post count: 16516

    Hi John,

    Thanks for letting us know. This is resolved.

Viewing 12 posts - 31 through 42 (of 42 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket