[SOLVED] kml-files to Wordpress: the integration of openstreetmap into the wordpress-framework

Apr 30, 2020
23
0
10
hello and good evening

the question of the day: kml-files to Wordpress: the integration of openstreetmap into the wordpress-framework

i am working on the integration of several maps.

i download them here:
https://export.hotosm.org/de/v3/exports/289a6286-0bba-403d-a9c7-431e5d019d76

eg. as kml

note here we have the following File Formats

  • see each file format.
  • GeoPackage .gpkg
  • Shapefile .shp
  • Garmin .img
  • Google Earth .kml
  • OSM .pbf
  • MAPS.ME .mwm
  • OsmAnd .obf
  • MBTiles .mbtiles

well which one is appropiate - which one to choose!?
well finally i want to upload .kml files to WordPress. I am currently planning to add the maps to WordPress

we have a bunch of tools that could be useful here: see the openstreetmap-plugins: - especially those ones that work with openstreetmap: see the following ressources:

a. https://wordpress.org/plugins/search/openstreetmap/
b. https://wordpress.org/plugins/search/openstreetmap/page/2/


if i do not use one of the plugins then i could integrate the "data on the fly" into the skeleton of a wp-plugin:

my guesses: For KML/KMZ files to be properly supported, we'll have to use text/xml and application/zip instead,
kml is detected as text/xml and not application/xml, changing the code accordingly should resolve the issue described in the comments below.
well i think that WordPress compares the declared MIME type to the 'real' detected MIME type (see function wp_check_filetype_and_ext in wp-includes/functions.php for more details)


so the question is: can we do this integration like so

Code:
function add_upload_mimes($mimes) {
  $mimes['kml'] = 'text/xml';
  $mimes['kmz'] = 'application/zip';
  return $mimes;
}
add_filter('upload_mimes', 'add_upload_mimes');


see the plugins: especially those who work with OpenSteetMap:

a. https://wordpress.org/plugins/search/openstreetmap/
b. https://wordpress.org/plugins/search/openstreetmap/page/2/

a bunch of great plugins - would you use one of them or would you do it without any plugin!?`


look forward to hear from you
 
Solution
Likely there are some trade-offs involved....

I would establish quantifiable end point requirements for the desired map integrations.

Factors: processing time, automation (macros, scripts, coding etc.), human interaction, error checking, storage requirements, etc..

Then I would test the individual plugins, process SOP and so forth to determine/measure which plugins meet the requirements.

May take a couple of iterations to get the testing process established to ensure some level of equal comparisons in the final results.

The plugins (or not) that achieve the end point requirements would be my choice.

Do the work, show your results, and present your conclusions. Request further comment accordingly.

Ralston18

Titan
Moderator
Likely there are some trade-offs involved....

I would establish quantifiable end point requirements for the desired map integrations.

Factors: processing time, automation (macros, scripts, coding etc.), human interaction, error checking, storage requirements, etc..

Then I would test the individual plugins, process SOP and so forth to determine/measure which plugins meet the requirements.

May take a couple of iterations to get the testing process established to ensure some level of equal comparisons in the final results.

The plugins (or not) that achieve the end point requirements would be my choice.

Do the work, show your results, and present your conclusions. Request further comment accordingly.
 
Solution