Issue with waypoints in the example at the top of google-map-directions
brendanebers opened this issue · comments
The example at the top of google-map-directions doesn't work. The waypoints attribute needs to be valid JSON. The example is:
<google-map-directions map="{{map}}"
start-address="San Francisco"
end-address="Mountain View"
travel-mode="TRANSIT"
waypoints="[{location: 'Palo Alto'}, {location: 'San Mateo'}]"></google-map-directions>
<google-map map="{{map}}" latitude="37.779"
longitude="-122.3892"></google-map>
In the console there's a warning Polymer::Attributes: couldn
t decode Array as JSON`. The easiest fix is to use single quotes for the html attribute and then double quotes in the JSON.
waypoints='[{"location": "Palo Alto"}, {"location": "San Mateo"}]'
This is inconsistent styling, but prettier than the alternative of using"
.
waypoints="[{"location": "Palo Alto"}, {"location": "San Mateo"}]"
Nit: travel-mode="TRANSIT"
can't be used with waypoints.
Interested in a PR?
On Fri, Nov 6, 2015, 7:59 PM Brendan Ebers notifications@github.com wrote:
The example at the top of google-map-directions doesn't work. The
waypoints attribute needs to be valid JSON. The example is:
In the console there's a warning Polymer::Attributes: couldn`t decode
Array as JSON. The easiest fix is to use single quotes for the html
attribute and then double quotes in the JSON.waypoints='[{"location": "Palo Alto"}, {"location": "San Mateo"}]'
This is inconsistent styling, but prettier than the alternative of using
".waypoints="[{"location": "Palo Alto"}, {"location": "San Mateo"}]"
Nit: travel-mode="TRANSIT" can't be used with waypoints.
—
Reply to this email directly or view it on GitHub
#226.
Derp. I see you did :)
On Fri, Nov 6, 2015, 8:33 PM Eric Bidelman ebidel@gmail.com wrote:
Interested in a PR?
On Fri, Nov 6, 2015, 7:59 PM Brendan Ebers notifications@github.com
wrote:The example at the top of google-map-directions doesn't work. The
waypoints attribute needs to be valid JSON. The example is:
In the console there's a warning Polymer::Attributes: couldn`t decode
Array as JSON. The easiest fix is to use single quotes for the html
attribute and then double quotes in the JSON.waypoints='[{"location": "Palo Alto"}, {"location": "San Mateo"}]'
This is inconsistent styling, but prettier than the alternative of using
".waypoints="[{"location": "Palo Alto"}, {"location": "San Mateo"}]"
Nit: travel-mode="TRANSIT" can't be used with waypoints.
—
Reply to this email directly or view it on GitHub
#226.