Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can you show us how to track location #21

Open
papyr opened this issue May 6, 2020 · 6 comments
Open

Can you show us how to track location #21

papyr opened this issue May 6, 2020 · 6 comments

Comments

@papyr
Copy link

papyr commented May 6, 2020

Hello, I have someone who is a dog walker or a bicyclist, but your samples don't show this.

  1. How can I get the SF compoment in phone to push the location data back with phone ID to the Syncfusion Map and show the history. Can you show me a snippet.
  2. How can I ensure both phone and web server ASP WebAPI are in sync, or buffred if data connection is lost.
  3. Also how to show icons on the map, bus stop, road etc.

Thanks

@jeyakasipandi
Copy link

Hi @papyr ,

Query 1: How can I get the SF compoment in phone to push the location data back with phone ID to the Syncfusion Map.

We would like to let you know that you can achieve this requirement by adding the Xamarin SfMaps to get the current location of device by using the Geolocation.GetLastKnownLocationAsync() method of Xamarin.Essentials and add the marker pin on maps using the current location values. Please refer the below KB for this.

https://www.syncfusion.com/kb/11379/how-to-show-the-current-gps-location-in-xamarin-forms-maps-sfmaps

Query 2: How can I ensure both phone and web server ASP WebAPI are in sync, or buffred if data connection is lost.

As we do have support to render maps with given input data and show marker over it based on the input geo coordinate points. We would like to inform that the reported scenario should be ensured in application using required API's. You can ensure the connectivity related cases using the below link.

https://docs.microsoft.com/en-us/xamarin/essentials/connectivity?tabs=android

Query 3: Also, how to show icons on the map, bus stop, road etc

You can achieve this requirement by creating a custom marker (inheriting from MapMarker class) using MarkerTemplate property and you can set the value for Latitude and Longitude property to show marker on SfMaps.

https://help.syncfusion.com/xamarin/maps/markers#add-custom-marker

@papyr
Copy link
Author

papyr commented May 11, 2020

Hello thanks, I saw this code to send the location. Can you tell me,

        CustomMarker marker = new CustomMarker();
        marker.Latitude = location.Latitude.ToString();
        marker.Longitude = location.Longitude.ToString();
        this.layer.Markers = new ObservableCollection<MapMarker> { marker };
  1. Does the observable auto sync/send the data to the server
  2. Is it received in the correct order (QOS)
  3. How can I draw a trails of a biker, jogger etc, with over them to show the persons information, both inside the Mobile Sync Xamarin and also ASP Core), hot to cold, green to red (red is the most recent)

@RabhiaBehamK
Copy link

Hi Papyr,

Query 1: Does the observable auto-sync/send the data to the serve

We would like to suggest that you can fetch data and create the marker collection based on data and assign it to the Markers property or bind to the Markers. So, the marker automatically updates the map based on data.

Query 2: Is it received in the correct order (QoS)

We would like to let you know that the marker will be rendered in maps based on the marker collection.

Query 3: How can I draw trails of a biker, jogger, etc, with over them to show the persons information, both inside the Mobile Sync Xamarin and also ASP Core), hot to cold, green to red (red is the most recent)

You can achieve this scenario by defining the marker template using MarkerTemplate. Please refer to the below help document link.

https://help.syncfusion.com/xamarin/maps/markers?cs-save-lang=1&cs-lang=xaml#add-custom-marker

Show the information by enabling the ShowTooltip and set value for ValuePath property in TooltipSettings of Marker. Please refer to the below help document link.

https://help.syncfusion.com/xamarin/maps/tooltip#tooltip-for-markers

For ASP Core, we can able to plot the location in the maps using the marker. The marker shape can be changed using the "Shape" property in the marker settings. Marker color can be changed using the "colorValuePath" in the marker settings. Please find the sample reference below.

Sample:
https://www.syncfusion.com/downloads/support/directtrac/general/ze/SyncfusionWebApplicationMapSample-1709640556

@papyr
Copy link
Author

papyr commented Aug 16, 2020

Hello @RabhiaBehamK I understand the marker class, but I wanted the server bind for the actual location updates.

When the jogger or car moves - we need a sample showing the data stream push from ASP server to SF control on the mobile and web side. This data binding/push is what I am asking because as it is now, its very convoluted and long process to get data updates.
For e.g. how can I get a syncfusion class on the server side, with a delegate or a signalR scenario to push updates to the Marker, when the jogger moves.

@papyr
Copy link
Author

papyr commented Sep 28, 2022

Any updates?

@papyr
Copy link
Author

papyr commented Dec 16, 2022

Hello @bharatdwarkani @georgelivingston @jeyakasipandi any updates on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants