MapView is a new Rails gem that renders static PNG maps using pure Ruby, built on top of libgd-gis and ruby-libgd. It eliminates the need for JavaScript mapping libraries like Leaflet or Mapbox by generating cached PNG images server-side from GeoJSON data. The gem provides two view helpers — map_view for GeoJSON files or strings, and map_view_point for single coordinates — with support for multiple basemaps (OSM, CARTO, ESRI), YAML-based custom styling, and automatic PNG caching. Ideal for delivery tracking, store locators, real estate listings, and GIS reports where interactivity is not required. Released as v0.1.0 alpha under MIT for open source and a commercial license for production use.

7m read timeFrom rubystacknews.com
Post cover image
Table of contents
The Problem We’re SolvingThe Solution: Pure Ruby RenderingHow It WorksGetting StartedInstallationCreate Sample DataRender in ViewAPI: The Two Main Helpersmap_view(geojson_or_path, options = {})map_view_point(lon, lat, options = {})Real-World Use CasesDelivery & LogisticsReal Estate ListingsStore LocatorMarketing MaterialsStyling MapsPerformance: MapView vs LeafletThe Journey: From GD to MapViewLicensingOpen Source (MIT)Commercial LicenseWhat’s Next?ConclusionShare this:Related
5.2K Impressions