zoom control on google maps
This topic contains 8 replies, has 4 voices, and was last updated by Stiofan O’Connor 6 years, 8 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support TicketTagged: google maps, position, zoom control
-
AuthorPosts
-
March 27, 2018 at 5:26 pm #423681
Hello,
I want to set zoom control on right on home page map:
I was try:
function geodirectory_position_map_control_options( $map_options ) { // Position should be one of TOP, TOP_LEFT, TOP_RIGHT, BOTTOM, BOTTOM_LEFT, BOTTOM_RIGHT, LEFT, RIGHT $map_options['zoomControlOptions']['position'] = 'RIGHT_CENTER'; // Zoom control return $map_options; } add_filter( 'geodir_map_options_geodir_map_v3_listing_map_6', 'geodirectory_position_map_control_options', 100, 1 );
I was also try to add position of zoom control to snazzy maps code and import in GD custom google maps and position doesn’t change (at bottom)
[ { "featureType": "landscape.man_made", "elementType": "geometry", "stylers": [ { "color": "#f7f1df" } ] }, { "featureType": "landscape.natural", "elementType": "geometry", "stylers": [ { "color": "#d0e3b4" } ] }, { "featureType": "landscape.natural.terrain", "elementType": "geometry", "stylers": [ { "visibility": "off" } ] }, { "featureType": "poi", "elementType": "labels", "stylers": [ { "visibility": "off" } ] }, { "featureType": "poi.business", "elementType": "all", "stylers": [ { "visibility": "off" } ] }, { "featureType": "poi.medical", "elementType": "geometry", "stylers": [ { "color": "#fbd3da" } ] }, { "featureType": "poi.park", "elementType": "geometry", "stylers": [ { "color": "#bde6ab" } ] }, { "featureType": "road", "elementType": "geometry.stroke", "stylers": [ { "visibility": "off" } ] }, { "featureType": "road", "elementType": "labels", "stylers": [ { "visibility": "off" } ] }, { "featureType": "road.highway", "elementType": "geometry.fill", "stylers": [ { "color": "#ffe15f" } ] }, { "featureType": "road.highway", "elementType": "geometry.stroke", "stylers": [ { "color": "#efd151" } ] }, { "featureType": "road.arterial", "elementType": "geometry.fill", "stylers": [ { "color": "#ffffff" } ] }, { "featureType": "road.local", "elementType": "geometry.fill", "stylers": [ { "color": "black" } ] }, { "featureType": "transit.station.airport", "elementType": "geometry.fill", "stylers": [ { "color": "#cfb2db" } ] }, { "featureType": "water", "elementType": "geometry", "stylers": [ { "color": "#a2daf2" } ] }, { "zoomControl": "true", "zoomControlOptions": { "position": "google.maps.ControlPosition.RIGHT_CENTER" } } ]
Thanks for help,
T
March 28, 2018 at 8:06 am #423764Hi there,
Could you check out this post and see if it helps? https://wpgeodirectory.com/support/topic/map-controls/#post-246964
Thanks!
March 28, 2018 at 8:59 am #423779Hello
I saw this post and try to use but doesn’t work (first post). I assume problem is in filter because I don’t know which filter I must use if I want to change zoom positon only on homepage map.
I was also try with:
add_filter( 'geodir_map_options_geodir_map_v3_home_map', 'geodirectory_position_map_control_options', 100, 1 );
For displaying home map I use shortcode:
[gd_homepage_map]
in geodir-home.php
Thanks for help,
T
March 28, 2018 at 5:46 pm #423854I will flag this for the developers to see if there is a filter you can use.
March 29, 2018 at 9:19 am #423988The filter is map specific, i would need to view your page to see the ID used for the map. Can you provide a link please.
Thanks,
Stiofan
March 29, 2018 at 12:43 pm #424021This reply has been marked as private.March 30, 2018 at 8:48 am #424151Try this (remember to include the function also)
add_filter( 'geodir_map_options_gd_home_map', 'geodirectory_position_map_control_options', 100, 1 );
Thanks,
Stiofan
P.S. i like what you have done with the map 🙂
March 30, 2018 at 2:19 pm #424197Thanks for help, it works!
and thanks:)
T
March 30, 2018 at 7:10 pm #424212Great! You are welcome! 🙂
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket