App.accessRule('*');
App.accessRule('https://*.googleapis.com/*');
App.accessRule('https://*.google.com/*');
App.accessRule('https://*.gstatic.com/*');
App.setPreference('android-targetSdkVersion', '23');
App.setPreference("WebAppStartupTimeout", 60000);
adding startup time will allow maps to load completely.
GoogleMaps.ready 'myMap', (map) ->
markers = []
markerCluster = new MarkerClusterer(map.instance, markers, clusterOptions)
OK, I think I know what's happening my `Meteor.startup(function() {
GoogleMaps.load({ key: '<my key>', libraries: 'places'});
});` is not running. If I run it manually through Safari console, the map shows up.
I thought Meteor.startup should only run once Cordova is ready... thoughts?
const directionsService = new GoogleMaps.DirectionsService();
const directionsDisplay = new GoogleMaps.DirectionsRenderer();
function createRoute(start, end) {
directionsService.route({
origin: start,
destination: end,
travelMode: google.maps.DirectionsTravelMode.DRIVING
}, function(response, status) {
if (status == google.maps.DirectionsStatus.OK) {
directionsDisplay.setDirections(response);
} else {
console.log('Nepovedlo se: ' + status);
}
});
}
Morning! I searched a lot on the Web for a solution but still need help. I have a map on which I show markers from a Meteor collection and a list on the left with the same collection items. I can click these markers to show an infoWindow and the corresponding list item on the left gets selected (Session variable).
I'm trying to get the reverse effect also, ie get the appropriate marker 'click' event to fire when I select an element in my list. However, when I handle the list item 'click' event, I'm outside of the GoogleMaps.ready scope where my markers array is defined. Can anyone point me in the right direction please?