Basically, we will just check every setting and if it’s not empty, we will store the value in the database. This function will help us to update whatever we enter in the widget form. Get_field_id( 'textarea' ) ) ?>" name="get_field_name( 'textarea' ) ) ?>">Īnd this is how the form looks like in WordPress admin:īut there are still some steps we need to make to see the map on the front end. Loop through options and add each one to the select dropdown _( 'Select zoom level', 'text_domain' ), jpeg or 3 band png (png8, png24)), MapTiler adds default White background. Documentation to MapTiler says, that if input files doesn't have transparency (e.g. Get_field_id( 'controls' ) ) ?>" name="get_field_name( 'controls' ) ) ?>" type="checkbox" value="1" /> tiff files have the same metadata (4 bands, no compression). And finally, if there will be a map in the widget area, there might be some additional info below the map in separate TEXTAREA. I can also imagine some of you would like to provide the possibility of showing map CONTROLS. It would be also nice if we will be able to ZOOM the map based on our needing. This brings us to other parameters, the longitude as LON and the latitude as LAT. Also, if we will need to display the map, we should know where is the location we want to focus on (coordinates). ) down to the address level, restrict the search area to a specific. With this control, users of your application can find any place on Earth (States, Cities, Streets. A geocoding control for MapTiler SDK, MapLibre GL JS and Leaflet utilizes MapTiler Cloud Geocoding API. Of course, there should be some TITLE of the widget. MapTiler Geocoding control for MapTiler SDK, MapLibre GL JS and Leaflet. Let's take a breath now and try to figure out, what we will need as options for our plugin. Select Folder with tiles and click on CHANGE next to Output. the geographical location and the input coordinate system: 5. The main responsibility of the form() function is to output the options form on admin. Please note that we do not provide support with issues resulting from the usage of the MapTiler application - please visit for MapTiler support. ‘customize_selective_refresh’ parameter allows the widget to be refreshed under Appearance > Customize when editing the widget so instead of refreshing the entire page only the widget is refreshed when making changes.
0 Comments
Leave a Reply. |