With some minimal code changes it's possible.
Could you give more details on how I can do it or do I need to request a quote on how much it would cost? Thanks.
If you're interested in paid services, please email us. As for details, I don't really have an answer off the top of my head. I would have to look at the code, same as you.
Dear Anton,
I already looked at the code and even managed to replace the image (directionSvg) in the preLoadImages.js file in this code snippet below,
but it is not dynamic according to the category.
Even changing the category continues to search for the same image.
Thanks!
// ORIGINAL
export const mapIconKey = (category) => (mapIcons.hasOwnProperty(category) ? category : 'default');
export const mapImages = {};
export default async () => {
const background = await loadImage(backgroundSvg);
mapImages.background = await prepareIcon(background);
mapImages.direction = await prepareIcon(await loadImage(directionSvg));
await Promise.all(Object.keys(mapIcons).map(async (category) => {
const results = [];
['primary', 'positive', 'negative', 'neutral'].forEach((color) => {
results.push(loadImage(mapIcons[category]).then((icon) => {
mapImages[`${category}-${color}`] = prepareIcon(background, icon, palette.colors[color]);
}));
});
await Promise.all(results);
}));
};
// MODIFIED WITHOUT SUCCESS
export default async (category) => {
const background = await loadImage(backgroundSvg);
const direction = await loadImage(mapIcons[mapIconKey(category)]);
mapImages.background = prepareIcon(background);
mapImages.direction = prepareIcon(direction);
// console.log(mapImages.direction);
// mapImages.direction = await prepareIcon(await loadImage(directionSvg));
await Promise.all(Object.keys(mapIcons).map(async (category) => {
const results = [];
['primary', 'positive', 'negative', 'neutral'].forEach((color) => {
results.push(loadImage(mapIcons[category]).then((icon) => {
mapImages[`${category}-${color}`] = prepareIcon(background, icon, palette.colors[color]);
}));
});
await Promise.all(results);
}));
Dear Anton,
I know your time is running out but would you know why I am not able to bring the image according to the category?
Thanks!
Sorry, but I don't think I can provide free help with customizations.
Alright, Justo, that's why I asked the question if I needed a quote.
I am sending an email to quote referring to this post. Which email for request?
Thanks!
You can find it on the about, support or pricing page. Or in fact at the bottom of every single page on this website there's an email icon. Have you seriously not been able to find the email address?
Anton, I can find email yes, no need for rudeness, humility really isn't for everyone.
I'M GLAD I HAVE TRACCAR AS A PRESENTATION OF THE SERVICES, because if it weren't for the treatment with people, nobody would hire them. I'm sure that here in Brazil you would be very well treated.
And on the contrary, I congratulate you for the great work with traccar.
Thanks!
He is not a patient person... he is quite rough and rude, but that does not take away from the fact that his work is very professional and outstanding...
greetings everyone.
Would anyone know if it's possible to leave only the marker icon with the same functionality as the direction.svg icon? the idea would be for the icon to point according to the position. This would be interesting because the front of the vehicle would already point the direction. thanks.