
Fix zoom feature on tracking map
$250-750 USD
Dibayar semasa penghantaran
We have a map showing athletes on a course, and our previous developer included a feature whereby the map zooms to the participants. However, it is not working anymore and the current developers haven't had capacity to look at it as they are busy with other parts of the app. We need to find the bug and fix it.
The full code is in github, but below is the relevant section.
Note: If you do not have experience with maps, please do not respond to this.
/*
If the athletes move and the user has not yet interacted with the map, pan the map so all athletes still show.
If the athletes move and the user has interacted with the map within the last 5 minutes, do nothing.
It the athletes move, and the user has not interacted in the last 5 minutes then pan to show all athletes in the race.
It the athletes move, and the user has not interacted in the last 5 minutes, and the user has selected favourites - then pan to show the selected favourites.
*/
fitPositionsBounds() {
const {
status,
athletes,
positions,
checkpoints,
isMoving,
simulateMassStart,
} = [login to view URL];
const map = [login to view URL];
const bounds = [login to view URL]();
const isFinished = [login to view URL](athletes).filter(
(id) => athletes[id].isFinished
).length
? true
: false;
const padding = [login to view URL] < 500 ? [50, 50] : [100, 100]; // Don't zoom too tight
const maxZoom = 14;
const options = { padding, maxZoom };
if ([login to view URL]() && simulateMassStart !== [login to view URL]) {
[login to view URL] = simulateMassStart;
[login to view URL](bounds, options);
}
if (
status !== "after" &&
!isFinished &&
![login to view URL] &&
!isMoving &&
checkpoints &&
[login to view URL]
) {
const startBounds = [login to view URL]();
[login to view URL](checkpoints[0]);
[login to view URL](checkpoints[1]);
// flyToBounds only works if map has an initial view
if ([login to view URL]() === undefined) {
[login to view URL](startBounds, options);
} else {
[login to view URL](startBounds, {
duration: 4,
padding,
maxZoom,
});
}
}
// First bounds set - TODO: Don't set if map is zoomed to start
if (status !== "after" && [login to view URL]() && isMoving) {
if (![login to view URL]) {
[login to view URL](() => {
if ([login to view URL]().isValid()) {
[login to view URL](bounds, options);
} else {
[login to view URL](bounds, options);
}
});
// Store bounds so we now that the map is zoomed once
[login to view URL] = bounds;
} else {
if (![login to view URL]) {
// User has not been interacting with map
[login to view URL](bounds, options);
} else {
// User has been interacting with the map
const secondsSinceLastInteraction =
([login to view URL]() - [login to view URL]) / 1000;
// Fly to bounds if user is inactive
if (secondsSinceLastInteraction > MAP_INACTIVITY_TIME) {
const selectedAthletes = [login to view URL](athletes).filter(
(id) => positions[id] && athletes[id].isSelected
);
if ([login to view URL]) {
const mapBounds = [login to view URL]();
const selectedAthletesBounds = [login to view URL](
(latLngBounds, id) => [login to view URL](positions[id]),
[login to view URL]()
);
const zoom = [login to view URL]();
if () {
const onFlyEnd = () => {
[login to view URL]("moveend", onFlyEnd);
// Second try: Zoom to athlete bounds if needed
if () {
[login to view URL](selectedAthletesBounds, options);
}
};
if (zoom < 12) {
// First try: Fly to center of selected athletes, keep zoom
[login to view URL]("moveend", onFlyEnd);
[login to view URL]([login to view URL]());
} else {
[login to view URL](selectedAthletesBounds, options);
}
}
} else {
[login to view URL](bounds, options); // Fit to all athletes
}
}
}
}
}
}
ID Projek: #37237845
Tentang projek
34 pekerja bebas membida secara purata $480 untuk pekerjaan ini
Hello, I AM HERE TO FIX zoom feature on tracking map - Stay up-to-date with recent and relevant technologies ^^^^I am here to achieve your goals^^^^ I am Passionate PHP /Full stack developer having rich experience wit Lagi
Hello, Greetings! I have read your project description and am confident that I can complete this project to your satisfaction. However, I do have a few queries. Please leave a message in the chat so that we can discu Lagi
Hello Good evening , I hope you are doing great. Just finished reading the brief details of your job . I see you have been looking for a freelancer who has experience with Cartography & Maps, MySQL and GPS. Upon the f Lagi
Hi There, I hope this message finds you well. I understand that you are experiencing an issue with the map zoom feature in your app. I have reviewed the relevant section of the code you provided, and I believe I can h Lagi
Hi Good evening This is Umair You can see clearly from my profile that all my reviews/feedbacks are 5 stars and that's for a sole reason that I only take those projects which are doable for me. I am very much famil Lagi
Hi hope you doing Good. I read your job brief regarding fixing zoom issue in your web app right Yes I can fix your Project all issues that will leave a wonderful impact on your user and its very Very economical for y Lagi
Hello, I'm an experienced Mern Stackdeveloper. I can help fix zoom feature on tracking map. I can start your project immediately. Best regards
hello. I checked your js code carefully and very interested. I'v rich expriences of google map and web developments. I am confident to satisfy you and hope to work for you. best regards
Dear Client, I hope this message finds you well. I'm thrilled to submit my bid for the project you have posted. As an experienced software engineer with a strong focus on MySQL development, I am confident in my abilit Lagi
hi i have read your description i will fix your zoom feature on tracking map please give me a chance i am expert of js jquery and have a strong efficiency of developer. Thanx
Dear Client, I hope this proposal finds you in good spirits! I couldn't help but notice the zoom feature on your tracking map seems to be giving you a bit of trouble. Fear not, for I am here to save the day! With my Lagi
Daniel G.! Nice to meet you I am extremely interested your project Fix zoom feature on tracking map and It seems great! I am an expert who has many years of experience on Cartography & Maps, MySQL, GPS so I am sure t Lagi
Hi Mate Daniel G., Good evening! I am an expert mobile developer with skills including MySQL, GPS and Cartography & Maps. "moveend" Please contact me to discuss more about this project. Looking forward to serve yo Lagi
Hi, how are you? I read your project details and really interested in this project. I am full stack developer having a 5+ year experience doing similar jobs regarding to these skills Cartography & Maps, GPS and MySQL. Lagi
Hi there, I am thrilled to express my interest in your Fix zoom feature on tracking map project. Leveraging a rich background spanning 4-5 years in GPS, Cartography & Maps and MySQL, I am well-equipped to bring substa Lagi
Hi, dear! I have good experience in google map. I'm sure I can help you absolutely. Please contact me. Regards!
Hi Sir, As a highly skilled and experienced, I am confident that I can provide the high-quality work you need, but i have some doubts regarding the same, lets discuss in detail make it clear & then i am ready to start Lagi