Option for loading utfgrid via jsonp

This commit is contained in:
Matthew Perry
2012-02-13 16:56:35 -08:00
parent 5857af5fec
commit 867080a074
2 changed files with 35 additions and 22 deletions

View File

@@ -82,6 +82,20 @@ OpenLayers.Layer.UTFGrid = OpenLayers.Class(OpenLayers.Layer.Grid, {
*/
serverResolutions: null,
/**
* APIProperty: useJSONP
* Should we use a JSONP script approach instead of a standard AJAX call?
*
* Set to true for using utfgrids from another server.
* Avoids same-domain policy restrictions.
* Note that this only works if the server accepts
* the callback GET parameter and dynamically
* wraps the returned json in a function call.
*
* {Boolean} Default is false
*/
useJSONP: false,
/**
* Constructor: OpenLayers.Layer.UTFGrid
*