[OutSystems Maps] Map beam
outsystems-maps
Reactive icon
Forge component by Platform Maintenance
Application Type
Mobile, Reactive

Any suggestions on how to setup the radius and the beam on either OutSystems Maps or GoogleMapsMobile components for a users position?


Solution

Hi @André Pinho!

Regarding all things above, here some notes:

- The solution you share above is android based, so we can't use it on this context since our solution is based on Google Javascript API service.

- Since we're using the Google Javascript API service (which is paid by the amount of calls to that API), if you want to create something to show a user live position on top of this API it will be super expensive, since the map must be updated with the current user position, and each update will end on a API call.

Based on the last point above we can not add a "user live position" feature because of that "limitation"...


Hope it helps.

José Rio

Hi @André Pinho,

Sorry for the delay answering you.

Can you share with us a bit more about your use case? Do you want to give feedback about your current location onLoad? Or do you need to have a live update?

Best Regards,
João Ferreira


Hey João, live update would be amazing, but as a first step it could be on load (although the direction of the beam then makes less sense - as this is more a realtime feature). I have used maps in some apps that have a radius around the pin (this I believe is tied to accuracy of the GPS), and the direction you are facing (the beam), I have also seen an arrow used for this, wondered if this was a simple setting or if there was a special bit of JS that could be included to enable this.

Good Morning @André Pinho,

Once more, sorry for the time waiting for feedback, I think we have an workaround for you.
Since this component don't offer native behaviors, you can try to use another one (https://www.outsystems.com/forge/component-overview/1395/location-plugin) that can reach your location. With that info you can config a custom marker, with those coordinates and a custom icon, to achieve a similar look and feel.

Let me know if this helps you,

Best regards,
João Ferreira 

I see, I am already using this but for a static location for the user (LAT/LON).

But if I understand you correctly we could use: 

  • the Accuracy to determine the radius (wider circle) 
  • the Heading to show the beam direction 

I think that could work, let me give that a go.

@João, I think the specific service I was after was this, seems like a better solution off the shelf: https://developers.google.com/maps/documentation/android-sdk/location#my-location

Any idea, how I would go about enabling or testing this using JS within OS? I believe this would still probably need to be tied with the Location plugin but assuming the user gave permission for location services?

Solution

Hi @André Pinho!

Regarding all things above, here some notes:

- The solution you share above is android based, so we can't use it on this context since our solution is based on Google Javascript API service.

- Since we're using the Google Javascript API service (which is paid by the amount of calls to that API), if you want to create something to show a user live position on top of this API it will be super expensive, since the map must be updated with the current user position, and each update will end on a API call.

Based on the last point above we can not add a "user live position" feature because of that "limitation"...


Hope it helps.

José Rio

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.