(position)
| 77 | } |
| 78 | |
| 79 | function onFirstPosition(position) { |
| 80 | setUserLocation(position.coords.latitude, position.coords.longitude); |
| 81 | map.panTo(userLocation); |
| 82 | var message = {}; |
| 83 | message.lat = position.coords.latitude; |
| 84 | message.lng = position.coords.longitude; |
| 85 | message.text = "I just connected to the map!" |
| 86 | |
| 87 | client.publish("pgochat/chat", JSON.stringify(message)); |
| 88 | } |
| 89 | |
| 90 | function onPositionUpdate(position) { |
| 91 | if (markersMap[mySessionId]) { //update user marker position |
no test coverage detected