generate a map server side and save/return it as png image

Overview

NFT map generator

Request a new map to be generated with latitude and longitude params, for example http://localhost:3000/maps?lat=45.3579&lng=9.4427

The server will user Playwright to start a browser in headless mode, inject the base.html content into the page and then inject the script to generate the map with the requested coordinates.

The image is saved as map.png and also returned as a response to the browser, you can change the path where it's saved or disable saving on disk.

You can customize the size of the image by changing both the css inside base.html and the viewport/screen properties of the headless browser spawned by playwright.

For the demo I'm using OpenLayers map because it doesn't require an API key but you can use any library you want because at the end of the day it's rendering HTML and saving the screenshot of the page.

You might also like...

optimize image & upload file to cloud as image bed with tiny image automic.

optimize image & upload file to cloud as image bed with tiny image automic.

Rush! 图片压缩 & 直传图床工具 这是一个兴趣使然的项目, 希望 Rush! 能让这个世界的网络资源浪费减少一点点 下载 Downloads 获取最新发行版 功能 Features 拖拽批量压缩图片, 支持格式 jpg/png/gif Drop to optimize, jpg/png/gif

Nov 12, 2022

Save time by managing bills & expenses, invoicing & easy reconciliation all in one app. Generate clear dynamic statements and get your reports, the way you like them

Save time by managing bills & expenses, invoicing & easy reconciliation all in one app. Generate clear dynamic statements and get your reports, the way you like them

expense-manager-app (Opensource Expense Tracking App built with React) 🔥 Save time by managing bills & expenses, invoicing & easy reconciliation all

Oct 12, 2022

Simple string diffing. Given two strings, striff will return an object noting which characters were added or removed, and at which indices

Simple string diffing. Given two strings, striff will return an object noting which characters were added or removed, and at which indices

Jan 6, 2023

Borrow & Return bowl for the restaurants

Borrow & Return bowl for the restaurants

App Center Sample App for React Native The React Native application in this repository will help you quickly and easily onboard to Visual Studio App C

Jan 24, 2022

NLW8.0 - Return

NLW8.0 - Return

NLW #08 - Return Sobre | Funcionalidades | Telas | Tecnologias | Requisitos | Iniciando | Licença | Autor 🎯 Sobre Descrição do projeto ✨ Funcionalida

May 13, 2022

🧩 TypeScript utility type in order to ensure to return only properties (not methods) containing values in primitive types such as number or boolean (not Value Objects)

🧩 TypeScript utility type in order to ensure to return only properties (not methods) containing values in primitive types such as number or boolean (not Value Objects)

🧩 TypeScript Primitives type TypeScript utility type in order to ensure to return only properties (not methods) containing values in primitive types

Dec 7, 2022

Chrome & Firefox extension to return old Twitter layout from 2015.

Chrome & Firefox extension to return old Twitter layout from 2015.

OldTwitter (2022) Chrome extension to return old Twitter layout from 2015. This extension doesn't add any CSS on top of original Twitter. It's fully o

Jan 4, 2023

This package is for developers to be able to easily integrate bad word checking into their projects.\r This package can return bad words in array or regular expression (regex) form.

Vietnamese Bad Words This package is for developers to be able to easily integrate bad word checking into their projects. This package can return bad

Nov 3, 2022

Make drag-and-drop easier using DropPoint. Drag content without having to open side-by-side windows

Make drag-and-drop easier using DropPoint. Drag content without having to open side-by-side windows

Make drag-and-drop easier using DropPoint! DropPoint helps you drag content without having to open side-by-side windows Works on Windows, Linux and Ma

Dec 29, 2022
Owner
Mattia Asti
Mattia Asti
View maps, graphs, and tables of your save and compete in a casual, evergreen leaderboard of EU4 achievement speed runs. Upload and share your save with the world.

PDX Tools PDX Tools is a modern EU4 save file analyzer that allow users to view maps, graphs, and data tables of their save all within the browser. If

PDX Tools 24 Dec 27, 2022
On this page, you can save and load all the awesome books you have and save the name and the author into the local storage. this project uses Javascript to interact with the pages

Awesome Books: refactor to use JavaScript classes In this project, We add the links to the applications into the final project Getting Started if you

Cesar Valencia 8 Nov 29, 2022
A simple To Do List application that allows users to save, edit, mark completed, and delete their to-dos, and save their list when application is closed. Build with JavaScript.

To Do List A simple To Do List online application that allows users to save, and manipulate their to-dos, and save their list when application is clos

Mahmoud Rizk 10 Dec 20, 2022
Hashmat Noorani 4 Mar 21, 2023
Fast and minimal JS server-side writer and client-side manager.

unihead Fast and minimal JS <head> server-side writer and client-side manager. Nearly every SSR framework out there relies on server-side components t

Jonas Galvez 24 Sep 4, 2022
Easy server-side and client-side validation for FormData, URLSearchParams and JSON data in your Fresh app 🍋

Fresh Validation ??     Easily validate FormData, URLSearchParams and JSON data in your Fresh app server-side or client-side! Validation Fresh Validat

Steven Yung 20 Dec 23, 2022
aka Scaletor, take screenshots of a piece of a map and scale/compare with other parts of the map

scale-a-tron A quick-and-dirty map that lets you compare one area to another. Draw a shape around a region, zoom in to another place on the map, and c

Stamen Design 24 Nov 7, 2022
Monolithic repo for api server, image server, web server

Onsecondary Market Deployed at https://market.onsecondary.com Monolithic repo for api server, image server, web server TODO -use a script to cull expi

Admazzola 2 Jan 11, 2022
A remote nodejs Cache Server, for you to have your perfect MAP Cache Saved and useable remotely. Easy Server and Client Creations, fast, stores the Cache before stopping and restores it again!

remote-map-cache A remote nodejs Cache Server, for you to have your perfect MAP Cache Saved and useable remotely. Easy Server and Client Creations, fa

Tomato6966 8 Oct 31, 2022
A vanilla javascript library to generate Avataaars on the client or server side!

Use the awesome Avataaars Library by Pablo Stanley (avataaars.com) in any javascript application. This Project uses parts of the Dicebear Avatars Libr

Hannes Bosch 26 Dec 4, 2022