Lavanya Gopal GIS | Data Science | Remote Sensing | Engineering

  • Home
  • Resume

Nanaimo Schools using Google Maps API



  • JavaScript functions are essential for enhancing map functionality, and in this project, they play a crucial role in creating a dynamic map with the Google Maps JavaScript API. This map displays all schools within a 1.5 km radius of Nanaimo District Secondary School, featuring a search radius, scale bar, and geolocation capabilities to locate the user's current position.
  • The map highlights the census tract population boundary for Nanaimo, symbolized in orange, using a geoJSON file imported via the Features to JSON geoprocessing tool in ArcGIS Pro. The search radius, shown in green, was created using the Draw on map example from the Google Developers website. To enhance the map's interactivity, I implemented a function to generate markers with pop-ups for each school within the search radius. These pop-ups are customized to include images of the schools.
  • Additionally, I wrote a snippet of code to set up geolocation with error handling using a button labelled 'Pan to current location'. Depending on the user's response, the map either centers on the current location or displays an error message if location access is denied.