Last active
July 8, 2020 14:42
-
-
Save cliffordp/52d0bfb6d1537a19d158deb351dd9fa7 to your computer and use it in GitHub Desktop.
Revisions
-
cliffordp revised this gist
Sep 2, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,7 +8,7 @@ * Updated 2018-08-06 because PRO v4.4.30 removed one of the parameters. * * @link https://gist.github.com/cliffordp/52d0bfb6d1537a19d158deb351dd9fa7 * @link https://boundingbox.klokantech.com/ Find the coordinates of a box on a map. Selecting "DublinCore" output will be most helpful. * @link https://theeventscalendar.com/support/forums/topic/africa-really/ */ add_filter( 'tribe_events_pro_localize_script', 'custom_map_view_starting_geocoordinates', 10, 2 ); -
cliffordp revised this gist
Aug 7, 2018 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,8 @@ <?php /** * Events Calendar PRO: Change default coordinates and zoom level for Map View's * start location (for when there are no event results found, to avoid African coast). * * Change the coordinates to your liking. See the link below for a helpful tool. * Updated 2018-08-06 because PRO v4.4.30 removed one of the parameters. -
cliffordp revised this gist
Aug 7, 2018 . 1 changed file with 3 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,7 @@ * and for when there are no event results found. * * Change the coordinates to your liking. See the link below for a helpful tool. * Updated 2018-08-06 because PRO v4.4.30 removed one of the parameters. * * @link https://gist.github.com/cliffordp/52d0bfb6d1537a19d158deb351dd9fa7 * @link https://www.mapdevelopers.com/draw-rectangle.php Find the coordinates of a box on a map. Selecting "DublinCore" output will be most helpful. @@ -18,8 +18,8 @@ function custom_map_view_starting_geocoordinates( $data, $object ) { $data['geocenter'] = array( 'min_lat' => 40.477399, // south limit 'max_lat' => 40.917577, // north limit 'min_lng' => -73.700272, // east limit 'max_lng' => -74.25909, // west limit ); if ( @@ -33,6 +33,5 @@ function_exists( 'tribe_is_map' ) } } return $data; } -
cliffordp revised this gist
Aug 7, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -26,7 +26,7 @@ function custom_map_view_starting_geocoordinates( $data, $object ) { function_exists( 'tribe_is_map' ) && tribe_is_map() ) { // TODO: change to your preferred zoom level add_filter( 'tribe_events_single_map_zoom_level', function ( $zoom_level ) { return 15; } ); -
cliffordp revised this gist
Aug 7, 2018 . 1 changed file with 15 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,14 +5,14 @@ * and for when there are no event results found. * * Change the coordinates to your liking. See the link below for a helpful tool. * Updated 2018-08-06 to account for PRO version 4.4.30 removing one of the parameters. * * @link https://gist.github.com/cliffordp/52d0bfb6d1537a19d158deb351dd9fa7 * @link https://www.mapdevelopers.com/draw-rectangle.php Find the coordinates of a box on a map. Selecting "DublinCore" output will be most helpful. * @link https://theeventscalendar.com/support/forums/topic/africa-really/ */ add_filter( 'tribe_events_pro_localize_script', 'custom_map_view_starting_geocoordinates', 10, 2 ); function custom_map_view_starting_geocoordinates( $data, $object ) { if ( 'tribe-events-pro' === $object ) { // TODO: Tweak as needed to focus in on the desired geography (these ones are zoomed into New York City) $data['geocenter'] = array( @@ -21,9 +21,18 @@ function custom_map_view_starting_coordinates( $data, $owner, $object ) { 'min_lng' => - 73.700272, // east limit 'max_lng' => - 74.25909, // west limit ); if ( function_exists( 'tribe_is_map' ) && tribe_is_map() ) { // TODOchange to your preferred zoom level add_filter( 'tribe_events_single_map_zoom_level', function ( $zoom_level ) { return 15; } ); } } return $data; } -
cliffordp revised this gist
Jan 20, 2018 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,8 @@ * and for when there are no event results found. * * Change the coordinates to your liking. See the link below for a helpful tool. * Note that these coordinates only affect the CENTER of the map and not its * zoom level, no matter how tight your min/max pairs are. * * @link https://gist.github.com/cliffordp/52d0bfb6d1537a19d158deb351dd9fa7 * @link https://www.mapdevelopers.com/draw-rectangle.php Find the coordinates of a box on a map. Selecting "DublinCore" output will be most helpful. -
cliffordp revised this gist
Jan 20, 2018 . 1 changed file with 13 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,20 +4,25 @@ * Events Calendar Pro: Change default coordinates for Map View starting center * and for when there are no event results found. * * Change the coordinates to your liking. See the link below for a helpful tool. * Also change the zoom level of your Map View within this snippet. * * @link https://gist.github.com/cliffordp/52d0bfb6d1537a19d158deb351dd9fa7 * @link https://www.mapdevelopers.com/draw-rectangle.php Find the coordinates of a box on a map. Selecting "DublinCore" output will be most helpful. * @link https://theeventscalendar.com/support/forums/topic/africa-really/ */ function custom_map_view_starting_coordinates( $data, $owner, $object ) { if ( 'tribe-events-pro' === $object ) { // TODO: Tweak as needed to focus in on the desired geography (these ones are zoomed into New York City) $data['geocenter'] = array( 'min_lat' => 40.477399, // south limit 'max_lat' => 40.917577, // north limit 'min_lng' => - 73.700272, // east limit 'max_lng' => - 74.25909, // west limit ); } return $data; } add_filter( 'tribe_events_pro_localize_script', 'custom_map_view_starting_coordinates', 10, 3 ); -
cliffordp revised this gist
Jan 20, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,7 @@ * Events Calendar Pro: Change default coordinates for Map View starting center * and for when there are no event results found. * * @link https://gist.github.com/cliffordp/52d0bfb6d1537a19d158deb351dd9fa7 * @link https://theeventscalendar.com/support/forums/topic/africa-really/ */ add_filter( 'tribe_events_pro_localize_script', 'custom_map_view_starting_geocoordinates', 10, 3 ); -
cliffordp created this gist
Jan 20, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ <?php /** * Events Calendar Pro: Change default coordinates for Map View starting center * and for when there are no event results found. * * @link * @link https://theeventscalendar.com/support/forums/topic/africa-really/ */ add_filter( 'tribe_events_pro_localize_script', 'custom_map_view_starting_geocoordinates', 10, 3 ); function custom_map_view_starting_geocoordinates( $data, $owner, $object ) { if ( 'tribe-events-pro' === $object ) { // Tweak as needed to focus in on the desired geography (these ones are near New York City) $data['geocenter'] = array( 'min_lat' => 41, 'max_lat' => 45, 'min_lng' => -73, 'max_lng' => -77, ); } return $data; };