Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hey Guys,
I'm working on an application that would benefit from custom map tiles where the map is, in essence, an artists high res image. It's not even a map. But clients need to put markers on the image. Many many markers. I believe this can be done using openLayers, but I was curious if anyone has had any experience doing this and may be able to lead me in one direction or another.
Best,
J
Comments
Comment #1
stopshinal CreditAttribution: stopshinal commentedAlso - It would be good to set some map extremes, so it couldn't be browsed much beyond that? Otherwise just simply painting the rest of the map a default color would also work i suppose.
Comment #2
phayes CreditAttribution: phayes commentedWhat you want to do is process that image into XYZ tiles, then use it as an XYZ layer source.
Your best is likely tilemill: http://mapbox.com/tilemill/
Some other random map tiling programs I found from googling:
http://www.klokan.cz/projects/gdal2tiles/
http://www.maptiler.org/
Comment #3
stopshinal CreditAttribution: stopshinal commentedI've been playing around with tilemill - one snag is that the images are not related to any projections, nor does it look like tilemill will spit out xyz layers.
With any of these suggestions, can I host the titles on my server, or would I need a service like mapbox to host them?
J
Comment #4
phayes CreditAttribution: phayes commentedYou can certainly host the files on your server. If you don't care about projection then just select a dummy one (EPSG:4326 likely). Check out those other two links and see if they work for you.
Comment #5
phayes CreditAttribution: phayes commentedAlso check out: http://mapki.com/wiki/Automatic_Tile_Cutter
Comment #6
tregeagle CreditAttribution: tregeagle commentedI'd like to do something similar and found this article useful:
http://atendesigngroup.com/blog/custom-map-tiles-illustration
It is aimed at custom maps but could be used for a custom image.
Comment #7
klokantech CreditAttribution: klokantech commentedMapTiler can help you with preparing the tiles for OpenLayers or Leaflet.
See this tutorial:
https://www.youtube.com/watch?v=9iYKmRsGoxg&index=2&list=PLGHe6Moaz52PiQ...
This will give you an OpenLayes viewer - which is using pixel coordinates of the image as the internal coordinates.
You can check the code of the OpenLayers viewer and add markers easily.
You may find also useful the tutorial for Drupal made by Paul Vreede, see the PDF attached to: https://www.drupal.org/node/2384877
Comment #8
Pol