v1.0.1flutter_image_map
圖像地圖,在影像上建立可自訂顏色的區域,並對點擊/觸碰做出回應。就像我們在 HTML 中擁有的那樣。
itzMeerkat/flutter_image_map open-source repository details.
以下為英文專案原文快照,最新內容請造訪 GitHub。
A simple but (hopefully) useful package that implements the HTML image map standard.
Originally introduced in HTML 3.2 as a replacement for server side imagemaps. Server side image maps were clunky requiring a round trip to the web server to determine where to go based on the coordinates clicked in the image. Thus client side image-maps were born!
An imagemap is a graphic image where a user can click on different parts of the image and be directed to different destinations. imagemaps are made by defining each of the hot areas in terms of their x and y coordinates (relative to the top left hand corner). With each set of coordinates, you specify a link that users will be directed to when they click within the area.
As an example, say you have a map of the World that you wish to act as an image map. Each country could have their hot areas defined on the map to take you to different pages.
Check out the Example project for a full example code of all the differents ways to define image map regions.
Select an image

Click on the image to add vertices of ROIs

If you want to create a new ROI, click on "New Polygon"

When you are done, press "Export"

It will pop up a dialog

The format of the data is:
List<List>, each sub-list describes a polygon. To adjacent numbers represent a position.
e.g.
[
[x1,y1,x2,y2,x3,y3,...],//Polygon 1
[x1,y1,x2,y2,x3,y3,...],//Polygon 2
[x1,y1,x2,y2,x3,y3,...],//Polygon 3
]
依賴清單 3 項
{"sdk":"flutter"}^2.0.0^2.0.2先依使用情境篩選,再比較專案活躍情況,最後到原始儲存庫確認使用要求。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗