I don’t see a forum for enhancement requests so please let me know if I should make the request somewhere else.
I have menu items on my website for maps of the small towns in our community.
http://jaltembadirectory.com/maps/chacala-map/
They are pages with a shortcode for the home map. They zoom the map to that community by specifying the latitude and longitude. eg. [gd_homepage_map width=100% height=500 scrollwheel=true child_collapse=true latitude=21.163909141320662 longitude=-105.22250089386215 zoom=16 autozoom=false]
I specify latitude, longitude and zoom to get the map to show just that community.
BUT that shortcode does not allow lat and long to be specified so I had to patch geodirectory_shortcodes.php and map.js.
I would like to know:
Is there a way to do this without a patch?
Is there a hook where I could put the patches?
If not I would like to suggest that the latitude and longitude be added to the SC by something like this in function geodir_sc_home_map($atts):
‘map_class_name’ => ‘geodir-map-home-page’,
‘is_geodir_home_map_widget’ => true,
//johan allow the short code to specify the latitude and longitude
‘latitude’ => $atts[‘latitude’],
‘longitude’ => $atts[‘longitude’],
//johan to here
);
//johan tell map.js to leave the center of the map alone if latitude and longitude were specified.
if (isset($atts[‘latitude’]))
$map_args[‘map_canvas_name’] = ‘gd_home_map_latset’;
//johan to here
// Add marker cluster