Fix zoom feature on tracking map

Lukket Opslået 2 måneder siden Betalt ved levering
Lukket Betalt ved levering

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 (![login to view URL](selectedAthletesBounds)) {

const onFlyEnd = () => {

[login to view URL]("moveend", onFlyEnd);

// Second try: Zoom to athlete bounds if needed

if (![login to view URL](selectedAthletesBounds)) {

[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

}

}

}

}

}

}

Kartografi & Kort MySQL GPS

Projekt ID: #37237845

Om projektet

34 bud Remote projekt Aktiv 1 måned siden

34 freelancere byder i gennemsnit $480 timen for dette job

seefattechnologi

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 Flere

$500 USD in 7 dage
(42 bedømmelser)
7.5
divumanocha

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 Flere

$600 USD in 8 dage
(51 bedømmelser)
6.8
AwaisChaudhry

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 Flere

$750 USD in 14 dage
(14 bedømmelser)
6.7
extreamcode

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 Flere

$500 USD in 15 dage
(18 bedømmelser)
6.8
ahmadayaz

Please provide specific error message or behavior when using map zoom feature. I will fix the bug within estimated timeline and propose hourly rate for compensation. Thank you for considering my services, and I am conf Flere

$675 USD in 5 dage
(19 bedømmelser)
6.3
UmairAnwar93

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 Flere

$700 USD in 15 dage
(2 bedømmelser)
4.5
AITSoft

Hey there, I have 4 years of working experience in web technologies and I have a strong working knowledge of every possible framework which is in the market. In terms of client-end I know: MySQL, GPS and Cartography & Flere

$750 USD in 19 dage
(1 bedømmelse)
5.3
HamAbbasi00

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 Flere

$250 USD in 2 dage
(2 bedømmelser)
4.2
softdevelopp

Hello, I'm an experienced Mern Stackdeveloper. I can help fix zoom feature on tracking map. I can start your project immediately. Best regards

$500 USD in 5 dage
(1 bedømmelse)
3.8
dimkapacha

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

$670 USD in 8 dage
(3 bedømmelser)
3.5
MilosDelic0203

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 Flere

$500 USD in 7 dage
(3 bedømmelser)
2.9
MWaqar123

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

$300 USD på 1 dag
(5 bedømmelser)
2.8
danielhpp

Hello, Thanks for your job posting. I believe I can help you with 100% satisfied results. I am ready to start immediately and can complete with high-quality, fast speed as you want. Please start the chat and lets disc Flere

$700 USD in 7 dage
(1 bedømmelse)
1.8
TosheStojev

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 Flere

$290 USD in 7 dage
(0 bedømmelser)
0.0
vadymperebitiuk

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 Flere

$320 USD in 7 dage
(0 bedømmelser)
0.0
dmitrimykhailen3

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 Flere

$750 USD in 6 dage
(0 bedømmelser)
0.8
Sidrairfan078

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. Flere

$350 USD in 8 dage
(0 bedømmelser)
0.0
rashidamjad

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 Flere

$700 USD in 15 dage
(1 bedømmelse)
0.0
ThalesMyller

Hi, dear! I have good experience in google map. I'm sure I can help you absolutely. Please contact me. Regards!

$400 USD in 2 dage
(0 bedømmelser)
0.0
Techalchemy

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 Flere

$500 USD in 7 dage
(0 bedømmelser)
0.0