Title: Changing Google map view?
Last modified: August 1, 2017

---

# Changing Google map view?

 *  Resolved [WP-Tutorial](https://wordpress.org/support/users/wptutorial/)
 * (@wptutorial)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/changing-google-map-view/)
 * Hi UM Support Team,
 * Right now your googlemap application is set to the default map view. But as you
   may well know, there are other types of views that are as important such as hybrid
   and satellite.
 * Could you kindly tell us how we could change from map view to satellite view?
 * Here is your code at/wp-content/plugins/ultimate-member/core/um-filters-fields.
   php:
 *     ```
       	/***
   
       	***	@outputs a google map
   
       	***/
   
       	add_filter('um_profile_field_filter_hook__googlemap', 'um_profile_field_filter_hook__googlemap', 99, 2);
   
       	function um_profile_field_filter_hook__googlemap( $value, $data ) {
   
       		$value = '<div class="um-googlemap">
   
       					<iframe width="600" height="450" frameborder="0" style="border:0" src="https://maps.google.com/maps?q=' . urlencode( $value ) . '&output=embed"></iframe> 
   
       				</div>';
   
       		return $value;
   
       	}
       ```
   
 * Many thanks in advance!

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Support [Ultimate Member Support](https://wordpress.org/support/users/ultimatemembersupport/)
 * (@ultimatemembersupport)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/changing-google-map-view/#post-9374137)
 * Hi [@wptutorial](https://wordpress.org/support/users/wptutorial/),
 * You can try to use t=k parameter e.g.
 * `<iframe width="600" height="450" frameborder="0" style="border:0" src="https://
   maps.google.com/maps?t=k&q=' . urlencode( $value ) . '&output=embed"></iframe
   >`
 * Regards.
 *  [Ov3rfly](https://wordpress.org/support/users/ov3rfly/)
 * (@ov3rfly)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/changing-google-map-view/#post-9376571)
 * If you want to edit the iframe-url, e.g. add a parameter as explained, you can
   use a filter like this in theme functions.php, make sure prio is **above 99**
   to get the output after plugin creates it.
 *     ```
       function ov3rfly_um_profile_field_filter_hook__googlemap( $output, $data ) {
       	// edit existing iframe html
       	$output = str_replace(
       		'?q=',
       		'?t=k&q=',
       		$output
       	);
       	return $output;
       }
       add_filter( 'um_profile_field_filter_hook__googlemap', 'ov3rfly_um_profile_field_filter_hook__googlemap', 100, 2 );	// plugin uses prio 99
       ```
   
 * If you want to disable the plugin functionality and create complete new own html-
   code which can use the `$value` of googlemap field, you can use a filter like
   this in theme functions.php, make sure prio is **below 99** to be able to remove
   the plugin filter and its output.
 *     ```
       function ov3rfly_2_um_profile_field_filter_hook__googlemap( $value, $data ) {
       	// do not print old iframe html
       	remove_filter( 'um_profile_field_filter_hook__googlemap', 'um_profile_field_filter_hook__googlemap', 99 );
   
       	// $value has the content of field 'googlemap'
   
       	// example to get/use other fields, maybe for lat/lng or similar
       	$my_additional_field  = um_user( 'my_additional_field' );
   
       	// create new maps html
       	$output = '<p>your complete new google maps html for "' . $value . '" with iframe or api ...</p>';
   
       	return $output;
       }
       add_filter( 'um_profile_field_filter_hook__googlemap', 'ov3rfly_2_um_profile_field_filter_hook__googlemap', 98, 2 );	// plugin uses prio 99
       ```
   
 * Thanks for the great plugin [@ultimatemembersupport](https://wordpress.org/support/users/ultimatemembersupport/)–
   feel free to use these examples in plugin documentation.
 *  Thread Starter [WP-Tutorial](https://wordpress.org/support/users/wptutorial/)
 * (@wptutorial)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/changing-google-map-view/#post-9376968)
 * Good tips both of you!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Changing Google map view?’ is closed to new replies.

 * ![](https://ps.w.org/ultimate-member/assets/icon-256x256.png?rev=3160947)
 * [Ultimate Member – User Profile, Registration, Login, Member Directory, Content Restriction & Membership Plugin](https://wordpress.org/plugins/ultimate-member/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ultimate-member/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ultimate-member/)
 * [Active Topics](https://wordpress.org/support/plugin/ultimate-member/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ultimate-member/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ultimate-member/reviews/)

## Tags

 * [api](https://wordpress.org/support/topic-tag/api/)
 * [GoogleMap](https://wordpress.org/support/topic-tag/googlemap/)
 * [iframe](https://wordpress.org/support/topic-tag/iframe/)

 * 3 replies
 * 3 participants
 * Last reply from: [WP-Tutorial](https://wordpress.org/support/users/wptutorial/)
 * Last activity: [8 years, 10 months ago](https://wordpress.org/support/topic/changing-google-map-view/#post-9376968)
 * Status: resolved