WordPress.org

Forums

Leaflet Maps Marker (Google Maps, OpenStreetMap, Bing Maps)
[resolved] Custom background image (6 posts)

  1. fiero_alleaten
    Member
    Posted 2 years ago #

    Hi everybody, i have a probably silly and stupid question, but I don't know how to handle it. I'd like to create a custom fantasy map, with a custom background and editable markers just like Google Maps. I had this insane idea on this website: http://www.obsidianportal.com/campaigns/60326/maps/35830 which allows to create such maps. I was wondering if I could do the same with this plugin, or at least somebody of you could suggest me a way to get this effect.

    http://wordpress.org/extend/plugins/leaflet-maps-marker/

  2. RobertHarm
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,
    I havent tried it by myself, but I think Mapbox.com supports custom images as basemaps. You could create an account there, create your basemap there and then add the map to your wordpress plugin instance (can be configured in settings/map defaults).
    regards,
    Robert

    PS: as I give support for free, I'd appreciate your review at http://wordpress.org/support/view/plugin-reviews/leaflet-maps-marker ;-)

  3. fiero_alleaten
    Member
    Posted 2 years ago #

    Hi Robert, thanks for your super fast answer. I'm going to rate your plugin as soon as possible. Unfortunately mapbox allows to upload mbtiles files only :(

  4. RobertHarm
    Member
    Plugin Author

    Posted 2 years ago #

    you're welcome :-)
    I am sure there is a way to convert an image to a basemap - try searching leaflet-forum at leafletjs.com for example (and please let me know if you find something)
    If you found something, you can add custom basemap for example, which has more available options (like "enable continuous world" which is for indoor maps or images for example).
    regards,
    Robert

  5. fiero_alleaten
    Member
    Posted 2 years ago #

    Hey Robert, I made it, tomorrow i will write down what I have done. I just have to fix some little visualization issues but my map is there :)

  6. fiero_alleaten
    Member
    Posted 2 years ago #

    Ok, I asked the same thing on leaflet forum as you suggested, they had beautiful examples on how to build such maps, even if they use ImageOverlay class which I think not yet supported by this plugin (https://groups.google.com/forum/#!topic/leaflet-js/EQy6J5wE3Dw)

    So I found a very good app called MapTiler. It basically can generate basemap and layers for almost any kind of map, even if you need an API key to make it work with google or yahoo. But i didn't need all that stuff (if you want to know more about that app I suggest you to test it because it has been a perfect companion for your plugin for me), so I created a simple raster map with no geolocalization. The output it generated is a directory tree (Zoom-level/X/Y) and a simple html file to navigate it. I uploaded the whole folder to my wordpress website and I changed a custom basemap URL of your plugin to the folder {z}/{x}/{y}.png (I omitted the {s} tag, I don't know if I made a mistake). Then i set tms to true and… that's all…

    Now… the map I uploaded is very small compared to the original map, so I should find a way to avoid all those "Map not found" tiles around my basemap, and avoid navigation outside the map… but it works :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic