Custom Marker Animations
I'm working on a project and need to add custom marker animations to animate travel between two locations(uber/lyft type effect). Has anyone implemented something similar? I was planning on using styled-components to handle the animation. Thanks
figured it out
@eamonpenland Any help how implement this?
@eamonpenland joining @Shadowman4205 on a request for a quick example of how you figured this out. I am trying to pass css3 style animations to the Marker element, needless to say it isn't going so well 😆
im using styled components something like this
const pulseAnimation = keyframes`
0% {-webkit-transform: scale(0);opacity: 0.0;}
25% {-webkit-transform: scale(0);opacity: 0.1;}
50% {-webkit-transform: scale(0.1);opacity: 0.3;}
75% {-webkit-transform: scale(0.5);opacity: 0.5;}
100% {-webkit-transform: scale(1);opacity: 0.0;}
`;
const Pulse = styled.div`
position: absolute;
left: -16px;
top: -15.91px;
height: 50px;
width: 50px;
z-index: 2;
opacity: 0;
border: 10px solid rgba(0,166,205,1);;
background: transparent;
border-radius: 60px;
animation: ${pulseAnimation} 2s ease-out infinite;
`;
const CustomDeviceIcon = styled.div`
width: 18px;
height: 18px;
background-color: #00a9e8;
color: #00a9e8;
border: solid 3px #ffffff;
border-radius: 50%;
cursor: pointer;
`;
<OverlayView
position={coordinates}
mapPaneName={OverlayView.OVERLAY_MOUSE_TARGET}
getPixelPositionOffset={getPixelPositionOffset}
key={id}
>
<presentation onClick={() => handleShapeClick(id)}>
<CustomDeviceIcon />
<Pulse />
</presentation>
</OverlayView>
that isn't for the animation between points...just applying animations to the marker
@eamonpenland : Hi, how did you manage to apply animation to the specific marker, I am trying to add a pulse effect on the marker but I am unable to position it to the respective markers.
Can you please help? I tried a lot of sites to get the answer, no luck yet! :(
@eamonpenland : No worries, I figured it out. Thanks