DEV Community

Dan Benge
Dan Benge

Posted on

The Week in Learning for Friday, June 15th, 2018.

As part of a technical screening project I did this week, I had to create a web app that would show 10,000 markers on a Google Map. Each coordinate had to be randomly generated and fall within a specific range of Latitude and Longitude. Each marker had to have a specific color that was based on another set of ranges. The screen had to display the total number of markers by color. Finally, you needed to be able to turn the markers on and off.

Then comes the kicker: this has to happen in SalesForce.

Yes, my friends, I had a crash course in Apex Script and generating web pages using VisualForce. I also had to learn the Google Map API.

I started with what I knew and decided to do the Javascript using JSFiddle and then when I was happy with that, I would move it to SalesForce.

When I began this project, I was wondering about showing 10,000 markers on a map. I mean what's the point of that? When I was finally able to get it to render, this is what it looked like. I laughed as it all clicked into place.

Google Map of North America with 10,000 Markers

So I had to create a custom SalesForce object, generate the coordinates in SalesForce using an Apex Script, transfer the Html and Javacript into a VisualForce page and then get the data from the created objects. Remember, I had never used SalesForce at all before starting this project.

I was only marginally successful. The issue is that the RemoteObjects feature of VisualForce can only grab up to 100 records. I couldn't for the life of me figure out how to get all the records by doing multple requests and chunking the data.

So what did I learn?

Sales Force and two of it's related APIs(Apex Script, Visual Force)
The Google Maps API.

What did you learn this week?

Discussion (1)

Collapse
adamukaapan profile image
Adam Krpan

This week was the second week of my first internship ever, so I've been getting a huge crash course in Angular 6, Docker, Kubernetes, and various other random concepts about web development. Loving it so far and excited to see what over unexpected places the project goes to!