This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Esta página contém detalhes do exercício utilizado como requisito para a oportunidade em aberto para atuar como desenvolvedor de software júnior pela empresa MapLink. | |
Nós disponibilizamos, <a href="https://gist.github.com/maplinkapi/6589077" target="_blank">através deste endereço</a>, um conjunto de dados no formato json, contendo dados de coordenadas geográficas (latitude e longitude), de origem e destino. Esses dados devem ser utilizados para realizar processos de roteirização. | |
Deve-se utilizar o web services de rotas da MapLink para realizar estas operações. Você encontrará detalhes de uso destas funcionalidades neste endereço: | |
<a href="http://dev.maplink.com.br/webservices/rotas/" target="_blank">http://dev.maplink.com.br/webservices/rotas/</a>. | |
Para consumir os métodos dos serviços da MapLink é necessário utilizar uma chave de acesso. Você pode utilizar a seguinte: | |
c13iyCvmcC9mzwkLd0LCbmYC5mUF5m2jNGNtNGt6NmK6NJK= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"id": 1, | |
"fuelCost": 1.68, | |
"distance": 5.24, | |
"totalTime": "PT13M" | |
} | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"id": 1, | |
"originCoordinate": { | |
"latitude": -23.565961, | |
"longitude": -46.651031 | |
}, | |
"destinationCoordinate": { | |
"latitude": -23.585593, | |
"longitude": -46.682677 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var divIdName = "divMap"; | |
var map = new MMap2(divIdName); | |
var point = new MPoint(-46.6520066, -23.5650127); | |
var zoomLevel = 8; | |
map.setCenter(point, zoomLevel); | |
LBS.Event.addListener(map, "mouseup", function (e) { | |
if (LBS.Event.isRightClick(e)) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var divIdName = "divMap"; | |
var map = new MMap2(divIdName); | |
var point = new MPoint(-46.6520066, -23.5650127); | |
var zoomLevel = 14; | |
map.setCenter(point, zoomLevel); | |
LBS.Event.addListener(map, "zoomend", function (e) { | |
alert("Nível de zoom alterado!"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
routeManager.createRoute(routeStops, routeOptions, null, function (response) { | |
var getPublicTransportationDetails = function (segmentDescription) { | |
var getFromSegmentDescription = function (segmentDescription) { | |
for (var index = 0; index < segmentDescription.length; index++) { | |
if (segmentDescription[index].publicTransportationDetails != null) | |
return segmentDescription[index].publicTransportationDetails; | |
} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var divIdName = "divMap"; | |
var map = new MMap2(divIdName); | |
var point = new MPoint(-46.6520066, -23.5650127); | |
var zoomLevel = 8; | |
map.setCenter(point, zoomLevel); | |
var getRouteStops = function () { | |
var getOriginStop = function () { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var divIdName = "divMap"; | |
var map = new MMap2(divIdName); | |
var point = new MPoint(-46.6520066, -23.5650127); | |
var zoomLevel = 8; | |
map.setCenter(point, zoomLevel); | |
var getRouteStops = function() { | |
var getOriginStop = function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
routeManager.createRoute(routeStops, routeOptions, null, function (response) { | |
var getPublicTransportationDetails = function(segmentDescription) { | |
var getFromSegmentDescription = function(segmentDescription) { | |
for (var index = 0; index < segmentDescription.length; index++) { | |
if (segmentDescription[index].publicTransportationDetails != null) | |
return segmentDescription[index].publicTransportationDetails; | |
} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var divIdName = "divMap"; | |
var map = new MMap2(divIdName); | |
var routeManager = new MRouteMannager(map, "#FF0000"); |
NewerOlder