I am trying to implement a Lightning component/VF page that could render a shape/layer on a Map(may be a Google Map) after successfully capturing the plotting.
Initially the end user submits a record that contains Geolocation (longitude and latitude) field. When he opens the created record, I would like to show a map(on a record detail section) which maps that coordinate on a map. Then I want the user to plot an area around the coordinates to extract the area that owns by the user. After he clicks on Save, I would like to store all the plotted coordinates and save it as a shape(or however feasible).
From here-on, whenever the user opens the record, the map should render the above extracted shape on the map section.
I am not sure how I can achieve this feature. If any ideas on what/how to use Salesforce's out-of-box functionalities and other integrations, that would be much appreciated.
My findings:
- https://releasenotes.docs.salesforce.com/en-us/winter18/release-notes/rn_field_service_package_polygons.htm (this could be FSL, which I am not intended to do, but looking for something similar)
- https://developers.google.com/maps/documentation/javascript/examples/polyline-complex
- https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_maps_example.htm
NOTE: I am not asking for someone to build or provide me with any code source. I am looking for ideas and thoughts around this implementation.