iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Hello Crosslight Support,
I have three questions about the "Map".
1. iOS and Android: I have a single marker placed on the map. Initially this marker is the center point of the map. The marker has a belonging info window. How can I initially show/open this info window? Right now the info window opens when clicking on the marker.
2. iOS and Android: Is there a chance to get a turn by turn driving description of a route (text)?
3. iOS and Android: In the view (ViewController or Activity/Fragment) there is an override (InfoWindowLayoutId). Settings the to "0" shows another info window as by default. How many layout ids are there for the info window? Where can I find a desciption about that an how these info windows look like?
Thanks,
Thomas
iOS and Android: I have a single marker placed on the map. Initially this marker is the center point of the map. The marker has a belonging info window. How can I initially show/open this info window? Right now the info window opens when clicking on the marker.
Currently there is no way to initially show/open info window. I will have this forwarded to Crosslight development team. The team will check the feasibility to implement this on the upcoming version of Crosslight.
iOS and Android: Is there a chance to get a turn by turn driving description of a route (text)?
Such feature is not available yet in the current version of Crosslight. I will have this forwarded to Crosslight development team. The team will check the feasibility to implement this on the upcoming version of Crosslight.
iOS and Android: In the view (ViewController or Activity/Fragment) there is an override (InfoWindowLayoutId). Settings the to "0" shows another info window as by default. How many layout ids are there for the info window? Where can I find a desciption about that an how these info windows look like?
Override InfoWindowLayoutId only applied to Android platform. InfoWindowLayoutId allows developer to use custom layout for the info window of a marker.
In order to use the default InfoWindowLayout - the native layout of info window -, we need to override InfoWindowLayoutId and return 0.
protected override int InfoWindowLayoutId { get { return 0; } }
The info window of Simple Marker in Crosslight MapSamples shows this behavior.
When not overriden, the info window will use Crosslight's info window layout. Custom Marker in Crosslight MapSamples uses Crosslight's info window layout, such as shown in the following screenshot.
You can also use your own custom layout for the info window. Just create the custom layout; override InfoWindowLayoutId; and return the custom layout.
Example:
protected override int InfoWindowLayoutId { get { return Resource.Layout.mapinfowindowlayout; } }
Note: I enclose the mapinfowindowlayout.axml for your reference.
Hope this helps.
Hello Yudi,
Thanks for answering. I hope you decide to implement the requested features.
Playing around with the map I found another issue. There is no two way binding of the CameraSettings on iOS maybe on Android, too. Moving around the map does not update the CameraSettings (I added two way binding in the binding provider). How can I save and restore the state of the map when leaving the map view and navigate back to the map view (view is initialized new)? A sample for iOS and Android would be nice.
A feature request, to get turn-by-turn driving description of a route, has been forwarded to Crosslight development team. The request is filed under CROS-806.I will keep you informed with any news I heard from the team regarding CROS-806.
Another feature request, to show marker's info window programmatically, has been forwarded to Crosslight development team. The request is filed under CROS-812.I will keep you informed with any news I heard from the team regarding CROS-812.
There is no two way binding of the CameraSettings on iOS maybe on Android, too. Moving around the map does not update the CameraSettings (I added two way binding in the binding provider). How can I save and restore the state of the map when leaving the map view and navigate back to the map view (view is initialized new)? A sample for iOS and Android would be nice.
The map view is used to show map so it only receives one way binding. Currently it is not possible to save and restore the state of the map when leaving and navigate back.
I found an interesting article in stackoverflow, which discuss about how to restoring Android map state.
Hope this help.
Edited on May 5, 2015 3:00 AMReason: add snippet code to save and restore map state.
Android
You can try to get the Southwest and Northeast visible region before leaving the map view. Example: add following snippet code in map fragment.
protected override void OnViewDisposed() { LatLng SouthwestBound = this.MapView.Map.Projection.VisibleRegion.LatLngBounds.Southwest; LatLng NortheashBound = this.MapView.Map.Projection.VisibleRegion.LatLngBounds.Northeast; // place code to save SouthwestBound and NortheastBound in here base.OnViewDisposed(); }
Next, set the CameraSettings and apply the latitude and longitude of SouthwestBound and NortheastBound when navigate back at the constructor of the view model.
public CustomMarkerViewModel() { this.Title = "Custom Marker"; this.Markers = this.Repository.GetAll(); this.CameraSettings = new CameraSettings( new MapRectBounds( new LocationCoordinate(SouthwestBound.Latitude, SouthwestBound.Longitude), new LocationCoordinate(NortheastBound.Latitude, NortheastBound.Longitude))); }
iOS
The Span and Center of map region can be obtained before leave the map view.
protected override void OnViewDisposed() { MKCoordinateSpan SpanPosition = this.Map.Region.Span; CLLocationCoordinate2D CenterPosition = this.Map.Region.Center; // place code to save SpanPosition and CenterPosition in here base.OnViewDisposed(); }
Next, set CameraSettings in view model when navigate back to map view.
public CustomMarkerViewModel() { this.Title = "Custom Marker"; this.Markers = this.Repository.GetAll(); this.CameraSettings = new CameraSettings(new MapRectBounds(new LocationCoordinate(latitude, longitude), radius)); }
what is the current status of CROS-806 and CROS-812.
Both issues are not on the fix list for Crosslight 4. When will these issues be fixed.
Based on the information I got from the team, they are expected to be available around Crosslight 4 Update 3.
have CROS-806 and CROS-812 ever been implemented?
this is still not answered!
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname