Search code examples
mapquest

Mapquest routes using custom icons


I'm using Mapquest's Javascript API for leaflet.

My code looks like this:

dir = MQ.routing.directions()
                .on('success',
                    function (data) {
                        console.log(data);
                        var legs = data.route.legs;
                        var maneuvers;
                        if (legs && legs.length) {
                            maneuvers = $.map(legs[0].maneuvers,
                                function(m) {
                                    return new Maneuvers(m);
                                });
                            self.maneuvers(maneuvers);
                        }
                    });
            dir.route({
                locations: [
                    self.from(),
                    self.to()
                ]
            });
            map.addLayer(MQ.routing.routeLayer({
                directions: dir,
                fitBounds: true
            }));

The results I get looks like this: enter image description here Although, this looks good, the icons don't look anything like the Get Direction module on mapquest.com enter image description here

How can I change the icons so that they look more modern?


Solution

  • There is a new icon service coming in the not too distant future with more modern icons. It will be a companion to a new static map version. Sorry, no eta yet.