This topic contains 4 replies, has 3 voices, and was last updated by admin 4 years, 5 months ago.
-
AuthorPosts
-
February 6, 2019 at 8:04 am #75437
When viewing the mode which shows pins on a map, if we have not selected a record to view the location, the map shows New York. Being based in the UK, how can we change this so if no record is displayed the map will display a location more relevant to us until a record is selected?
-
February 6, 2019 at 12:50 pm #75438
Hi William –
While there is no option to modify this within the configuration, you can add the following into your Custom JS area in the settings file:
scheduler.config.map_initial_position = new google.maps.LatLng(48.724, 8.215);
Replace the two numbers in parenthesis with the Latitude and Longitude that you’d like to start.
Instructions for adding this code:
Add custom code to soSIMPLE Calendar
Let us know how it goes.
-
February 6, 2019 at 3:42 pm #75439
Works perfectly. Exactly what we need. Now the user generally does not need to click into the list of events that day for the map to show the events it is listing. Thankfully the events are clustered around a particular area, which is why this was change was needed.
-
July 22, 2020 at 4:13 pm #76515
Ken,
I followed your instructions to modify the default starting Google map coordinates, applying the string “scheduler.config.map_initial_position = new google.maps.LatLng(27.1147021, -82.3804025);” in the Custom JS section of the Options. I have tried both enclosing the string within quotes (and without), but the map still reverts to the NYC area. Did I miss something? If I select an Event record, it displays the correct location. If I change the filtering value for the Calendar (i.e. Category or Zone or Assigned Employee), the map not only reverts to the NYC location, but also the selected Calendar display type (i.e. Map Week) changes to Map Day.
Attachments:
You must be logged in to view attached files. -
July 24, 2020 at 3:32 pm #76518
Try this instead:
scheduler.attachEvent(“onTemplatesReady”, function(){
scheduler.config.map_initial_position = new google.maps.LatLng(27.1147021, -82.3804025);
});
-
AuthorPosts
You must be logged in to reply to this topic.