|
Atul Kumar Oodles

Atul Kumar (Frontend-Sr. Associate Consultant L2- Frontend Development)

Experience:2+ yrs

Atul is a skilled frontend developer who specializes in ReactJs technology. He holds a comprehensive grasp of cutting-edge technologies and boasts hands-on familiarity with JavaScript, HTML/CSS, and additional tools and frameworks, including Typescript, NextJs, Jest, React Testing Library, and ReactJs. Atul is dedicated to the ongoing enhancement of his skill set and remains attuned to industry trends, ensuring optimal solutions for his clients.

Atul Kumar Oodles
Atul Kumar
(Sr. Associate Consultant L2- Frontend Development)

Atul is a skilled frontend developer who specializes in ReactJs technology. He holds a comprehensive grasp of cutting-edge technologies and boasts hands-on familiarity with JavaScript, HTML/CSS, and additional tools and frameworks, including Typescript, NextJs, Jest, React Testing Library, and ReactJs. Atul is dedicated to the ongoing enhancement of his skill set and remains attuned to industry trends, ensuring optimal solutions for his clients.

LanguageLanguages

DotEnglish

Fluent

Dothindi

Fluent

Skills
Skills

DotNext.js

80%

DotGithub/Gitlab

80%

DotTypeScript

60%

DotHTML, CSS

80%

DotReactJS

80%

DotFrontend

80%

DotAngular/AngularJS

40%

DotFront End UI

80%

DotJavascript

80%
ExpWork Experience / Trainings / Internship

May 2022-Jun 2023

React js developer

sector 75, mohali


Technogetic pvt. limited

sector 75, mohali

May 2022-Jun 2023

EducationEducation

2019-2022

Dot

Seth jai prakash mukand lal institute of information and technology(JMIT)

Bachelor's of computer applications-Computer applications

Top Blog Posts
Rendering Layers on Google Maps with Deck.gl in React

Integrating custom data visualization into a map interface can be challenging but rewarding. Recently, I worked on a project where I rendered interactive layers on Google Maps using Deck.gl in a React application. Leveraging the vis.gl package, I achieved a seamless integration between Google Maps and Deck.gl, enabling rich and performant visualizations.

In this blog, I'll walk you through how I set this up and some of the lessons I learned along the way.

Why Deck.gl and Google Maps?

Before diving into the implementation, let's address why I chose these tools:

  • Deck.gl: A powerful WebGL-based framework for visualizing large datasets. It offers out-of-the-box support for layers like scatterplots, heatmaps, GeoJSON, and more.
  • Google Maps: A ubiquitous mapping platform with robust APIs and unmatched global map data.

By combining these two, I aimed to leverage Deck.gl's visualization capabilities while maintaining the familiar interface and features of Google Maps.


Rendering Google Maps


import React from 'react';
import {createRoot} from 'react-dom/client';
import {APIProvider, Map} from '@vis.gl/react-google-maps';

const App = () => (
  <APIProvider apiKey={API_KEY}>
    <Map
      style={{width: '100vw', height: '100vh'}}
      defaultCenter={{lat: 22.54992, lng: 0}}
      defaultZoom={3}
      gestureHandling={'greedy'}
      disableDefaultUI={true}
    />
  </APIProvider>
);

const root = createRoot(document.querySelector('#app'));
root.render(
  <React.StrictMode>
    <App />
  </React.StrictMode>
);

 

Adding Deck.gl Layers

To add layers, I defined them using Deck.gl's API. For example, here's how I rendered a ScatterPolygonLayer:

import {ScatterplotLayer} from '@deck.gl/layers';

const layer = new ScatterplotLayer({
  id: 'bart-stations',
  data: [
    {name: 'Colma', passengers: 4214, coordinates: [-122.466233, 37.684638]},
    {name: 'Civic Center', passengers: 24798, coordinates: [-122.413756,37.779528]},
    // ...
  ],
  stroked: false,
  filled: true,
  getPosition: d => d.coordinates,
  getRadius: d => Math.sqrt(d.passengers),
  getFillColor: [255, 200, 0]
});

 

Challenges and Optimizations

1. Managing WebGL Contexts

A common issue with WebGL-based libraries is the WebGL context limit. Opening multiple map views simultaneously caused older contexts to be lost. I resolved this by unmounting Deck.gl layers when a tab became inactive and remounting them when the tab regained focus.

2. Handling Large Datasets

For large datasets, I ensured smooth rendering by using Deck.gl's optimizations, such as data filtering and reduced resolution for non-essential features.

3. Custom Interactions

Deck.gl supports custom interactivity, which I integrated using event handlers like onHover and onClick to enhance the user experience.



Final Thoughts

Combining Deck.gl with Google Maps offers immense flexibility for building interactive map-based visualizations. The vis.gl package simplifies the integration process, allowing developers to focus on crafting engaging layers and features. While challenges like managing WebGL contexts can arise, careful planning and best practices make them manageable.

If you're working on a similar project, I hope this guide provides a helpful starting point. The combination of Deck.gl and Google Maps is a powerful duo that unlocks new possibilities for geospatial visualization.

Vis.gl google maps - https://visgl.github.io/react-google-maps/
Deck.gl - https://deck.gl/

Category: ERP Solutions
Banner

Don't just hire talent,
But build your dream team

Our experience in providing the best talents in accordance with diverse industry demands sets us apart from the rest. Hire a dedicated team of experts to build & scale your project, achieve delivery excellence, and maximize your returns. Rest assured, we will help you start and launch your project, your way – with full trust and transparency!