Phoca Maps on IE 11 and Mozilla Firefox 31.2.0

Phoca Maps - displaying maps in Joomla! CMS
donpatrona
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 24 Mar 2015, 13:37

Phoca Maps on IE 11 and Mozilla Firefox 31.2.0

Post by donpatrona »

Hi, the plugin is working well with IE 9 and earlier version of Firefox, but on latest versions of the most popular browsers it's not working. Here what I recieve:
- An empty rectangle and this code below:
' }); google.maps.event.addListener(markerPhocaMarker1, 'click', function() { infoPhocaWindow1.open(mapPhocaMap, markerPhocaMarker1 ); }); google.maps.event.trigger(markerPhocaMarker1, 'click'); phocaDirService = new google.maps.DirectionsService(); phocaDirDisplay = new google.maps.DirectionsRenderer(); phocaDirDisplay.setMap(mapPhocaMap); phocaDirDisplay.setPanel(document.getElementById("phocaDir")); google.maps.event.addDomListener(tstPhocaMap, 'DOMMouseScroll', CancelEventPhocaMap); google.maps.event.addDomListener(tstPhocaMap, 'mousewheel', CancelEventPhocaMap); } } function setPhocaDir(fromPMAddress, toPMAddress) { var request = { origin: fromPMAddress, destination: toPMAddress, travelMode: google.maps.DirectionsTravelMode.DRIVING }; phocaDirService.route(request, function(response, status) { if (status == google.maps.DirectionsStatus.OK) { pPI = document.getElementById('phocaMapsPrintIcon'); pPI.style.display='block'; var from64 = Base64.encode(fromPMAddress).toString(); var to64 = Base64.encode(toPMAddress).toString(); pPI.innerHTML = '
Print Route
'; phocaDirDisplay.setDirections(response); } else if (google.maps.DirectionsStatus.NOT_FOND) { alert("One of the locations specified in the requests's origin, destination, or waypoints could not be geocoded."); } else if (google.maps.DirectionsStatus.ZERO_RESULTS) { alert("No route could be found between the origin and destination."); } else if (google.maps.DirectionsStatus.MAX_WAYPOINTS_EXCEEDED) { alert("Too many DirectionsWaypoints were provided in the DirectionsRequest."); } else if (google.maps.DirectionsStatus.OVER_QUERY_LIMIT) { alert("Webpage has sent too many requests within the allowed time period."); } else if (google.maps.DirectionsStatus.INVALID_REQUEST) { alert("The provided DirectionsRequest was invalid."); } else if (google.maps.DirectionsStatus.REQUEST_DENIED) { alert("Webpage is not allowed to use the directions service."); } else if (google.maps.DirectionsStatus.UNKNOWN_ERROR) { alert("Directions request could not be processed due to a server error. The request may succeed if you try again."); } else { alert("Directions request could not be processed due to a server error. The request may succeed if you try again."); } }); } function initialize() { tstPhocaMap.setAttribute("oldValue",0); tstPhocaMap.setAttribute("refreshMap",0); tstIntPhocaMap = setInterval("CheckPhocaMap()",500); } google.setOnLoadCallback(initialize); //]]>
Powe
donpatrona
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 24 Mar 2015, 13:37

Re: Phoca Maps on IE 11 and Mozilla Firefox 31.2.0

Post by donpatrona »

Ok, one amendment - The problem exists only when i attach a MARKER to the map.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca Maps on IE 11 and Mozilla Firefox 31.2.0

Post by Jan »

Hi, there is some javascript error :idea: - when you look into javascript console, are you able to find some more information :idea: https://www.phoca.cz/documents/16-joomla ... -conflicts

Jan
If you find Phoca extensions useful, please support the project
revxor
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 11 Jul 2016, 19:59

Re: Phoca Maps on IE 11 and Mozilla Firefox 31.2.0

Post by revxor »

I have the same problem. When I remove the marker the option for get route is no longer visible. When I add the get marker the get route option is visible. I then tried to type in an address and I get error message " No route could be found between the origin and destination "
I was able to duplicate this with IE, Firefox, google chrome, pale moon and Microsoft edge.
I then tried to same address on the real google maps and it works. Please advise on what I am doing wrong?

Update:
I did some more research and trouble shooting. I enabled JAVA logging and noticed that the API was failing at authenticating at google side to get the route.
I then enable the option to allow routes to be granted from the browser.
Once I did that, I was able to get the routes. Awesome. I hope this helps others for the same problem.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca Maps on IE 11 and Mozilla Firefox 31.2.0

Post by Jan »

Ok
If you find Phoca extensions useful, please support the project
christine
Phoca Hero
Phoca Hero
Posts: 2819
Joined: 28 Nov 2010, 17:20

Re: Phoca Maps on IE 11 and Mozilla Firefox 31.2.0

Post by christine »

Hi revxcor,
revxor wrote:Update:
I did some more research and trouble shooting. I enabled JAVA logging and noticed that the API was failing at authenticating at google side to get the route.
I then enable the option to allow routes to be granted from the browser.
Once I did that, I was able to get the routes. Awesome. I hope this helps others for the same problem.
We have similar same problem in another thread. Could you please describe exactly above actions?
I think you mean the Javascript Console of Google Map? and then? Where is this option to set allowance for routes?

Thank you for information & kind regards,
Christine
Post Reply