0
votes

I'd like to get my model from an api and passing my current position so I can get the 10 closest.

The server does the calculation and limits to 10 already.

What would be the best approach to load the data while passing the location params. knowing that I would like the application not waiting for the geolocation to starts displaying the interface. Then when geolocation is done inject the models.

What url scheme should I use?

Should I still use the rest adapter form ember-data or not?

1

1 Answers

1
votes

Assuming location is a property of the model you want to load, and Place is the name of your model, have you tried something like this:

App.Place.find({location: "foo"});

This would issue a request in the form:

myhost.com/places?location=foo

Hope it helps.