Support › General › Use Google Maps on backend and display Open Street Maps in TemplateResolved
Is it possible to use the Google Maps field on the backend (because it gives me better info than OSM) and then use Open Street Maps on the frontend to display the map?
I want to use OSM on the frontend because I don't want to have to pay for every page load.
Yes, it is possible. Field Google Maps and OSM save the same data format in the database so we can display the OSM on the frontend based on the value of the Google Maps field. Here is the sample code
$location = rwmb_get_value( 'google_map' );
$map = implode( ',', $location );
echo RWMB_OSM_Field::render_map( $map );
Read more on the documentation https://docs.metabox.io/fields/osm/#template-usage
That worked perfectly. Thanks!