ThinkGeo.com    |     Documentation    |     Premium Support

Xam Forms - Seek technical Guidance first time using ThinkGeo

Hello.

Moving from Gmaps in our Xam Forms app to potentially ThinkGeo as we are seeking more features than the basics offered by GMaps. It certainly seems ThinkGeo can offer that.

I am seeking some technical guidance how how best to implement my scenario. I hope someone can offer some help or direction here.

My scenario is similar to this.
We have a number of clients. Each of those clients will have a number of locations (store front/shops) and a number of vehicles to track.

So I expect to place each of the clients on their own overlay. The locations and vehicles on a separate layer because the locations (store front) will not move but the vehicles will move.

Now the vehicles will move and that movement will be sent to the map via SignalR so it can be a very rapid and frequent update cycle.

I am not sure where to place the vehicles.
Do I place them on the Features of a layer?
Do I place them on the InternalFeatures of a layer?
Do I place them on the Markers layer of an overlay?

Looking over the samples all 3 of those are used. I guess I am seeking clarification of when/why you would use those three options?

Some numbers:
Clients between 1 and 30.
For a client can have 1 to 60 locations and the same for vehicles.
These numbers are not fixed and could be much larger but generally in this range.
When they get larger we would seek to use clustering.

I hope I am making sense.

Regards
Chris …

Thanks Chris,
Based on your requirement description. And we do have some customer with similar scenario. Here is my suggestion.

  1. You may need a base map. such as Bing, WMTS or some other.
    mapView.Overlays.Add(thinkGeoCloudVectorMapsOverlay); The main point is put the background map to a separate overlay. the first one you put to the mapView.Overlays always in the bottom of the map. The later ones always on the top.
  2. Put the features which never change after map load to another separate overlay. Each overlay could have multiple layers. You can organize the features by layer or you can put them to just one layer. For your case I recommend just put all clients/stores to one layer. And put the layer to one separate overlay. for this overlay you don’t need call overlay.Refresh to redraw because the item won’t change after map loaded. You can either use shape layer or InMemoryFeatureLayer, SqliteFeatureLayer. This all depend on how your client/store data stored.
  3. Put the dynamic feature to another separate InMemoryFeatureLayer(s) and put the layer(s) to a separate overlay. You may need call overlay.Refresh the overlay if any new items drop/update to the layer in this overlay. You could put all dynamic features to one InMemoryFeatureLayer. You may need some attribute for your feature to differentiate these features. This will help you render the point with different icon/style. The “moving” point may need use an arrow icon. The “stop” point may need use a red circle icon. Here is the sample to render the feature with styles base on attribute values.
    https://gitlab.com/thinkgeo/public/thinkgeo-mobile-maps/-/blob/master/samples/xamarin-forms/HowDoISample/HowDoISample/Samples/CreatingStyles/CreateValueStyleSample.xaml.cs.
    You could also put each client’s dynamic features to a separate InMemoryFeatureLayer. This will help you turn the layer off/on quickly. If you have too many items on the overlay you can use ClusterPointStyle. Here is the detail:
    https://gitlab.com/thinkgeo/public/thinkgeo-mobile-maps/-/blob/master/samples/xamarin-forms/HowDoISample/HowDoISample/Samples/CreatingStyles/CreateClusterPointStyleSample.xaml.cs
  4. I would not recommend use the marker layers for your scenario. If you only have few landmark need show on the map. You could use the marker. Otherwise we’d better use InMemoryFeatureLayer.

So for you case you may need 3 overlays. #1, #2, #3 each one are a separate overlay. #3 may need multiple layers(each client has one layer) or just one(all client’s data in one layer) layer in the overlay.

Hope this is help for your project. Go ahead let us know if you have any question.

Thanks

Frank

Frank,

Thank you for such a quick and complete response to my questions.
You have really helped me out.

I do have a further question which I hope you can help with.
The doco and samples are excellent but they are “reference” doco and I am struggling to find some concept documentation.

What do I mean by that?
as an example I need to do vehicle GPS tracking.
Based off the samples I can see one sample that has 20k points being changed and refreshed every second using features in a layer and another sample doing vehicle GPS tracking via the marker property on just and overlay.
What point I am missing there is that while the marker property of an overlay was an acceptable use in this example was because there is only a single item to track. In my case of over 60 vehicles to track the better option would be a feature on a layer.

That fact is not clear in the samples nor the reference doco. You did answer that point above but I did ask the question.

As I am quite a new person to mapping and the fact ThnkGeo can do so much with so many “things” in so many ways I am looking for some conceptual doco where I can map my current basic knowledge of maps gained from simple use of GMaps to the advanced concepts of ThinkGeo.

The fact that markers on an overlay are quite convenient to use they do have the performance issue if you want to refresh a lot of them on a regular basis.

I hope I am clear in my question here Frank on some conceptual doco?

Regards
Chris …

Thanks Chris,
I am not sure I understand the “conceptual doco”. The full document you can find for the mapsuite.

http://wiki.thinkgeo.com/

Back to your concern. I would recommend use InMemoryFeatureLayer for your vehicle locations. The quick way to get the capability of the mapsuite just play around with the sample.

We do use mapsuite build the Gps Tracking system http://download.thinkgeo.com/MapSuiteGPSTrackingServer_QuickStartGuide.pdf

We also have a sample for the vehicle tracking application

This may not answer your question about the “conceptual doco”. But I hope it could help you understand what mapsuite could do.

Thanks

Frank

Frank.

Ah yes the wiki is what I was looking for when I used the term “conceptual”. Thank you.

You have given me much to work through and thank you for your help.

Cheers
Chris …

Thanks Chris,
Good to know it works. Go ahead let us know if you have any question.

Thanks

Frank