Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems using featureservice in browser #19

Open
mjuniper opened this issue Aug 27, 2015 · 2 comments
Open

Problems using featureservice in browser #19

mjuniper opened this issue Aug 27, 2015 · 2 comments

Comments

@mjuniper
Copy link

I am trying to use this in an ember-cli app.

First I tried loading it using ember-browserify because, it seems to me, that's the best way to load an npm module into an ember-cli app. When I called pages, I got "req.setTimeout is not a function". I wonder if I would need to provide browserify options to ember-browserify to make this work? You can see this in this branch: https://github.com/mjuniper/opendata-ember/tree/featureservice-ember-browserify by going to http://localhost:4200/datasets?q= and clicking on a dataset in the table.

Then, I tried loading the browser distribution from /dist. The only way I could figure out how to do that in the context of ember-cli was to copy the file to the vendor directory and then call app.import('vendor/featureservice.min.js'); in ember-cli-build.js which is horrible. In this case, when I call pages, it makes a request to port 443 even though it is an http url. This request eventually times out. You can see this in this branch: https://github.com/mjuniper/opendata-ember/tree/featureservice-vendor by going to http://localhost:4200/datasets?q= and clicking on a dataset in the table.

I'm willing to help fix it but I'd first like to hear people's thoughts. @chelm, @ngoldman, @dmfenton

@dmfenton
Copy link
Contributor

@mjuniper I'm happy to (have you) modify the code to make it work better in browsers.

  • The HTTPS issue sounds like a bug
  • How can we force timeouts on long running requests in browser compatible js?

I'm interested to hear more about your use case for pulling this into a browser. Bigger picture, what do we need to add or change?

@chelm
Copy link
Contributor

chelm commented Sep 1, 2015

the code forces https requests to all hosted services (at least it should) where https should always be enabled. If its not then its a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants