Extend away!
Without seeing code, I suspect what's happening here is that <polymer-ajax>
gets the URL, but it's of course incomplete. This still fires the element's internal urlChanged
handler. Since you have auto
, the request is made with bogus values.
I'd take off auto
as Ben suggested and use the event geo-location fires:
<geo-location latitude"{{latitude}}" longitude="{{longitude}}" on-geo-response="{{onLatLng}}"></geo-location>
<polymer-ajax id="ajax" handleAs="json" response="{{data}}" url="http://service/?latlng={{latitude}},{{longitude}}></polymer-ajax>
and handle the event:
onLatLng: function() {
this.$.ajax.go();
}
BTW, please use <core-ajax>
instead. The core-* elements are the elements we'll be supporting moving forward.
github.com/polymer/core-ajax