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 This is a common option for 4-band raster images, where the 4th band is an infra-red channel (eg used for analytics). MapTiler Engine allows ignoring the 4th band as the alpha band, the Transparency option is called Ignore alpha band. '6' => _( '6 (Big Cities)', 'text_domain' ), If your image has defined an alpha band, MapTiler Engine will use it for the export to a map. _( 'Select zoom level', 'text_domain' ), Get_field_id( 'controls' ) ) ?>" name="get_field_name( 'controls' ) ) ?>" type="checkbox" value="1" /> Create a new folder on your computer that will hold the map tiles. Get_field_id( 'lon' ) ) ?>" name="get_field_name( 'lon' ) ) ?>" type="text" value="" /> Download and install MapTiler Desktop Free from 2. 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. Select Folder with tiles and click on CHANGE next to Output. the geographical location and the input coordinate system: 5. Also, if we will need to display the map, we should know where is the location we want to focus on (coordinates). Please note that we do not provide support with issues resulting from the usage of the MapTiler application - please visit for MapTiler support. Of course, there should be some TITLE of the widget. Let's take a breath now and try to figure out, what we will need as options for our plugin. The main responsibility of the form() function is to output the options form on admin. ‘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. |