![]() ![]() Using the Zoomify Drupal module we are adding an automated server side tiling service on top of a completely standard filefield/imagefield, if in the future we need to rebuild all the imagetiles we can generate them in bulk with the help of widely used Drupal modules like Views Bulk Operations. We also have to recalculate this when it enters fullscreen by using the "enterFullscreen" callback. We are using a short delay in the enter fullscreen callbacks as we found that without it, leaflet was getting incorrect dimensions for the map container and the image. We use Zoomify Leaflet's _getBestFitZoom function to try and fit the image to the map container. The relevant code here starts on line 53, the code above deals with the RoyalSlider implementation. The next step is to include the javascript that will create the leaflet map and load the images into a tile layer. We've hard coded the imagecache preset at the moment but we will look to generalize this in the future. This function is fairly straightforward, it creates an element that leaflet will turn into a map using the data we provide it using the "data-zoomifyleaflet" attribute. There is also a formatter for outputing a multivalued imagefield as a slideshow using RoyalSlider but we will be focusing on the single image formatter "theme_wam_zoomify_leaflet_formatter_zoomify_leaflet_single". Leaflet Fullscreen plugin that provides a fullscreen button for maps.įirst we create a Field formatter based off of the Zoomify Imagefield sub module. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |