• apolloman

    (@apolloman)


    hello and good evening

    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

    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

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

    well the question is: can i do this with the Flexible-Map too. I love to hear from you

    • This topic was modified 4 years ago by apolloman.
  • The topic ‘Flexible_Map and the integration of KML into workdpress’ is closed to new replies.