Draw and draw areas in images

How to draw areas in an image based on points, for example, draw areas on Google maps? Dynamically with javascript.

Editing: The question is to place the map image on the page and draw an area on the top of the house, for example.

+4
source share
3 answers

Use an item.

+1
source

Another option is to use SVG or VML (IE only). Although the tags in the canvas are by far the easiest.

I experimented with dynamically generated SVG through javascript a while ago: here is an example usage.

+1
source

In addition to the JavaScript solution, you can always use PHP to dynamically draw lines. Then place the newly created image on top of the map image.

Here is a short tutorial: Drawing shapes with GD

+1
source

Source: https://habr.com/ru/post/1310760/


All Articles