Map View

Map View

google map view

 
By default, the left list of the view displays events beginning from the current date. To change such behavior, use the start_date, end_date properties.

Initialization

public ActionResult Index() {
    var sched = new DHXScheduler(this);
    ...
    var map = new MapView{
       ApiKey = "AIzaSyBjsINSH5x39Ks6c0_CoS1yr1Mb3cB3cVo"
    };//initializes the view
 
    sched.Views.Add(map);//adds the view to the scheduler
 
    return View(sched);
}

Google Map APIs requires an API key. See more details here

Properties

  • Label - (string) the text label. The default value - 'Map'.
  • ApiKey - (string) Google Maps API key.
  • ClientId - (string) Google Maps client ID.
  • Signature - (string) Google Maps digital signature.
  • MarkerGeoFail - (string) sets the text for the notice window that appears in case of unsuccessful geolocation response.
  • MarkerGeoSuccess - (string) sets the text for the notice window that appears in case of successful geolocation response.
  • Name - (string) the name of the view. The property is read-only. By default - 'map'.
  • StartDate - (DateTime) sets the date that the view will display events beginning from. By default - the current date.
  • EndDate - (DateTime) - sets the end date that the view will display events until.
  • TabClass - (string) the name of a css class that will be applied to the tab.
  • TabPosition - (integer) the right offset of the view tab in the tabbar. By default, tabs go right-to-left in the order of addition to the scheduler.
  • TabStyle - (string) the style that will be applied to the tab.
  • TabWidth - (integer) the width of the tab
  • ViewType - (string) the type of the view. The property is read-only.

Details

Beware, to be correctly rendered on the map view data must contain a number of additional properties. The final list of mandatory properties (that data should have) looks as in:

  • start_date (DateTime or string) - the date when the event is scheduled to begin. The default format - ”%m/%d/%Y %H:%i”.
  • end_date (DateTime or string) - the date when the event is scheduled to be completed. The default format - ”%m/%d/%Y %H:%i”.
  • text (string) - the event text.
  • location - (string) the location of an event.
  • lat - (float) the latitude of the event location.
  • lng - (float) the longitude of the event location.

comments powered by Disqus