Open StaggerLeee opened 7 years ago
I styled it somehow and had plans to share new location-editor.css, but there is no point. Tables make it long from finished. And will never be possible to finish it.
Small correction for snippet above. Better to use this one and limit snippet to post/page edit screens. It gives errors and problem in Geo Mashup Options screen.
function geo_mashup_editor_map() {
if( strstr($_SERVER['REQUEST_URI'], 'wp-admin/post-new.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/post.php') ) {
echo '<script type="text/javascript">
(function($) {
$(function () {
/* Specify the initial location/zoom level for the location editor map */
geo_mashup_location_editor.mapCreated.addHandler( function() {
geo_mashup_location_editor.map.setCenterAndZoom( new mxn.LatLonPoint( 48.2206636,16.3100207 ), 16 );
} );
})
})(jQuery);
</script>';
}
}
add_action( 'admin_head', 'geo_mashup_editor_map' );
You should be able use the customization plugin to center the map.
I'd be happy to consider replacing the table HTML & CSS. A pull request would be the best way to come up with a good working alternative.
A bigger effort would be to just create a new and better location editor. Feel free to add ideas to that wiki page.
Can you borrow some ideas from guy behind ACF plugin ? All his Metaboxes are without tables, even Google Map field.
Is it possible to do something about it ? Tables makes it impossible to style it better for smaller devices.
(If whole philosophy would change somehow it would be possible to use Metabox right-sidebar in backend. For now it is absolutely impossible, regarding how it looks. Maybe something like Mappress, 2 columns, not tables, 30% left columns for all values. Display block to be able to style them same way for phones. Right column 70% with map. Media queries for responsive and width of two columns changes accordinly.)
If you dont have time for it can you make file edit-form.php possible to override in theme folder: geo-mashup-edit-form.php ?
We can try to style it by ourself. Some things I changed not to touch plugin core files. More cannot be done for now.
I already did change location-editor.css to be overirden:
Here is another snippet for custom default coordinates and default zoom: