Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,29 @@ You're free to specify a center as well, otherwise the marker will be centered.

***

### Map with resized marker

```javascript
const marker = {
img: `${__dirname}/marker.png`, // can also be a URL
offsetX: 12,
offsetY: 24,
drawWidth: 24,
drawHeight: 24,
};

marker.coord = [13.437524,52.4945528];
map.addMarker(marker);

await map.render();
await map.image.save('resized-marker.png');
```

#### Output
![Map with resized markers](https://stephangeorg.github.io/staticmaps/sample/resized-marker.png?raw=true)

***

### Map with multiple marker
```javascript
const marker = {
Expand Down