forked from Snck3rs/contao-leaflet-maps
Implement custom route for data request to prevent partial rendering of the page and it's possible issues (f.e. form captcha changes) (Close #49).
This commit is contained in:
15
js/Contao.js
15
js/Contao.js
@@ -138,7 +138,7 @@ L.Contao = L.Evented.extend({
|
||||
* @param customLayer optional custom layer.
|
||||
* @param map Pass a map object so that the data loading events are passed to the map.
|
||||
*/
|
||||
loadFile: function (url, type, options, customLayer, map) {
|
||||
loadUrl: function (url, type, options, customLayer, map) {
|
||||
var layer = omnivore[type](url, options, customLayer);
|
||||
|
||||
if (map) {
|
||||
@@ -172,6 +172,19 @@ L.Contao = L.Evented.extend({
|
||||
return layer;
|
||||
},
|
||||
|
||||
/**
|
||||
* Load data from an url into a layer using omnivore.
|
||||
*
|
||||
* @param url A file url.
|
||||
* @param type The response content format.
|
||||
* @param options Parser options
|
||||
* @param customLayer optional custom layer.
|
||||
* @param map Pass a map object so that the data loading events are passed to the map.
|
||||
*/
|
||||
loadFile: function (url, type, options, customLayer, map) {
|
||||
return this.loadUrl(url, type, options, customLayer, map);
|
||||
},
|
||||
|
||||
/**
|
||||
* Point to layer callback. Adds a geo json point to the layer.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user