Comments (8)
My mistake! Now I have my application working, many many thanks!
from leaflet-ugeojson.
You should use the "parameters" option: https://github.com/BenjaminVadant/leaflet-ugeojson#how-to-use-the-parameters-option
from leaflet-ugeojson.
I need those parameters dynamically, but by now I'm hardcoding them like this:
L.uGeoJSONLayer({
endpoint: 'https://server/GetCoordinatesForPolygon',
parameters: function () { return { "x": "42", "y": "-2" } }
})
but in my browser, on request payload I'm getting this:
------WebKitFormBoundaryvF0jiA9IydbAwY8N
Content-Disposition: form-data; name="south"
41.47154438707647
------WebKitFormBoundaryvF0jiA9IydbAwY8N
Content-Disposition: form-data; name="north"
41.881831370505594
------WebKitFormBoundaryvF0jiA9IydbAwY8N
Content-Disposition: form-data; name="east"
0.435333251953125
------WebKitFormBoundaryvF0jiA9IydbAwY8N
Content-Disposition: form-data; name="west"
-0.08514404296875001
------WebKitFormBoundaryvF0jiA9IydbAwY8N
Content-Disposition: form-data; name="zoom"
10
------WebKitFormBoundaryvF0jiA9IydbAwY8N--
Thank you for the fast response.
from leaflet-ugeojson.
You catch a mistake in the code!
It should now be fixed.
Thanks!
from leaflet-ugeojson.
Thanks! Now it's working!
But I think that I catch another mistake or I'm doing something wrong: my server requires an 'application/json' enctype. I put enctype: 'json'
on uGeoJSONLayer config, but the request still being Content-Type: text/plain;charset=UTF-8
.
I made a hotfix writting: request.setRequestHeader('Content-Type', 'application/json');
on line 119, just before i send it.
Is there any other way to do it?
because i've hard coded your code to achieve this.
Thanks
from leaflet-ugeojson.
Content type is set in headers so ... use the headers option! https://github.com/BenjaminVadant/leaflet-ugeojson#how-to-use-the-headers-option
from leaflet-ugeojson.
When you are done, can you send me a link to your application?
from leaflet-ugeojson.
Sorry, my application it's for a top scret's FBI project.
Ha, ha, it's a joke, but it's for a private company than they want to visualize their properties and it's not a public app.
Anyway, I'm going to make a pull request to add one new feature soon ;)
from leaflet-ugeojson.
Related Issues (6)
- MInimum Zoomlevel? HOT 2
- disable geojson update HOT 3
- ugeojson and clustering HOT 8
- Add marker title/icon? HOT 1
- leaflet-ugeojson not found at npmjs.com HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from leaflet-ugeojson.