Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

marker height and width not working #94

Open
lambdaxyzt opened this issue Sep 15, 2024 · 3 comments
Open

marker height and width not working #94

lambdaxyzt opened this issue Sep 15, 2024 · 3 comments
Labels

Comments

@lambdaxyzt
Copy link

marker height and width option does not take effect in final result no matter how I tweak values !

@StephanGeorg
Copy link
Owner

Please provide some examples or test cases.

@lambdaxyzt
Copy link
Author

I use below code , marker width and height is 10 by 10

import StaticMaps from "staticmaps"
import path from "path"
const options = {
    width: 600,
    height: 400
};
const map = new StaticMaps({width:1000,height:1000});

const marker = {
    img: `https://unsplash.com/photos/cxj-8PILRU4/download?ixid=M3wxMjA3fDB8MXxhbGx8NHx8fHx8fDJ8fDE3MjY3MzI4NTl8&force=true&w=640`, // can also be a URL
    offsetX: 0,
    offsetY: 0,
    width: 10,
    height: 10,
    coord: [13.437524, 52.4945528]
};
map.addMarker(marker);
await map.render();
await map.image.save(path.resolve("./image.png"));

but the result I get
image

@lambdaxyzt
Copy link
Author

can someone take a look at example ? tnx .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants