franciccio-ITALIANO Posted April 17, 2023 Posted April 17, 2023 Hi, I found out that unfortunately openstreetmap maps are not viewable on mobile, also, the iframe tag is deprecated.I therefore had to resort to a processwire module. Not wanting to use google maps, I turned to https://processwire.com/modules/fieldtype-leaflet-map-marker/, but from the documentation it is not clear.Is there an EXAMPLE OF A WORKING USE OF MAP WITH MORE MARKERS ON PROCESSWIRE TEMPLATE? Maybe I'll copy that Thank you very much
BillH Posted April 18, 2023 Posted April 18, 2023 I don't think there's any particular problem with OSM maps on mobile devices. For example, see https://leafletjs.com/examples/mobile/. There are good instructions for the FieldtypeLeafletMapMarker module at https://processwire.com/modules/fieldtype-leaflet-map-marker/, but it might help to note that the basics (not tested) seem to be to include the following in the head section of your template: <?php $map = wire('modules')->get('MarkupLeafletMap'); echo $map->getLeafletMapHeaderLines(); ?> And in the body where you want the map to appear: <?php echo $map->render($page, 'NAME_OF_YOUR_MARKER_FIELD'); ?> To find out more about Leaflet (including markers), take a look at the Leaflet Quick Start Guide https://leafletjs.com/examples/quick-start/.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now