Map display

  1. When selecting an event in Map view, and Latitude and Longitude are empty, the map resolves to specific location (seems to default to Chad). I would rather have the map not move/render at all when there is no lat/lng.
  2. When first landing on the Map view, I would like the first event shown in the view (or the first one with a location), and displayed on the Map. Ideally, the map would zoom out and pan to show all events being displayed on the left. (visible events)
  3. Is there a line of code, or a function I can call to render a specific event on the map, and jump to that area of the map, like “mapEvent (ev.id)”?
  1. Double-clicking an event on the left in Map view doesn’t work. I’d like to remove the ‘details’ icon, but double-clicking the event doesn’t open it like it does in other views.

Hello,

  1. Map always scrolls to certain position when event is selected (it can be canceled using public API), however you can change the default shown locations:

scheduler.config.map_initial_position = new google.maps.LatLng(48.724, 8.215); // inital position of the map
scheduler.config.map_error_position = new google.maps.LatLng(15, 15); // this position will be displayed in case if event doesn’t have corresponding coordinates

docs.dhtmlx.com/scheduler/api__s … onfig.html
docs.dhtmlx.com/scheduler/api__s … onfig.html

  1. There is also no built-in method. Although you can trace the moment when user switches to the map view, then access the map object (you’ll have to use some inner properties for this) and set map position and zoom using Google Maps api

var map = scheduler.map._obj;// Google Map object

docs.dhtmlx.com/scheduler/api__s … event.html
developers.google.com/maps/docu … /reference

  1. Currently the only way to do it is to invoke onClick event of the scheduler, or to use map object directly
    scheduler.callEvent(“onClick”, [event_id, {}]);

docs.dhtmlx.com/scheduler/api__s … event.html

  1. The double clicks on event rows are disabled in Map view, possible solution would be to attach dbclick handler to the scheduler node and catch clicks on nested elements
    You can check whether scheduler is in map view using this method
    docs.dhtmlx.com/scheduler/api__s … state.html
    And tell the event dom element by checking ‘event_id’ attribute of the node

docs.dhtmlx.com/scheduler/api__s … htbox.html

Thank you Aliaksandr,

  1. Can I interrupt the click to see if location is set, then choose to not run the google function when ev.lat is missing?

  2. So, in order to show an event on the map programmatically I need to write google code to perform all the mapping? Is there there no way to call the inner function you’re using to show an event on the calendar?

  3. I tried this with no luck. I’ll try it again and let you know.

  4. I’ll give the dom node method a try. Thanks.

Are you planning on adding some of these calls to the maps view?

Thanks

ken

Hi,

  1. Unoftunately no, due to implementation there is not much flexibility in map view settings
    github.com/DHTMLX/scheduler/blo … ew.js#L335

  2. Yes, you’ll need to use google API. All inner functions of the map extension that works with it are defined inside a closure and can’t be accessed from outside.

We’ll update the map view at some point, however it’s not in our short term plans.

If you need some setting that are not supported, probably the most realistic approach would be to take the original map extension and customize it as you like (make sure to rename it in order to avoid conflicts with future updates)

github.com/DHTMLX/scheduler/blo … ap_view.js