How can I resolve this Leaflet error? getPixelWorldBounds() Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) Data science time! April 2019 and salary with experience Should we burninate the [wrap] tag? The Ask Question Wizard is Live!How do JavaScript closures work?How can I upload files asynchronously?How do I check if an element is hidden in jQuery?How do I remove a property from a JavaScript object?How do I redirect to another webpage?How can I get query string values in JavaScript?How do I include a JavaScript file in another JavaScript file?How to check whether a string contains a substring in JavaScript?How do I remove a particular element from an array in JavaScript?How do I return the response from an asynchronous call?
List *all* the tuples!
Why am I getting the error "non-boolean type specified in a context where a condition is expected" for this request?
Single word antonym of "flightless"
What's the purpose of writing one's academic biography in the third person?
How to find out what spells would be useless to a blind NPC spellcaster?
Extract all GPU name, model and GPU ram
What does this icon in iOS Stardew Valley mean?
What's the meaning of 間時肆拾貳 at a car parking sign
Why aren't air breathing engines used as small first stages
What causes the vertical darker bands in my photo?
Is it ethical to give a final exam after the professor has quit before teaching the remaining chapters of the course?
How to run gsettings for another user Ubuntu 18.04.2 LTS
English words in a non-english sci-fi novel
Why are there no cargo aircraft with "flying wing" design?
What would be the ideal power source for a cybernetic eye?
What LEGO pieces have "real-world" functionality?
Resolving to minmaj7
Why do people hide their license plates in the EU?
Book where humans were engineered with genes from animal species to survive hostile planets
Do I really need recursive chmod to restrict access to a folder?
What does an IRS interview request entail when called in to verify expenses for a sole proprietor small business?
Why did the IBM 650 use bi-quinary?
Error "illegal generic type for instanceof" when using local classes
Using et al. for a last / senior author rather than for a first author
How can I resolve this Leaflet error? getPixelWorldBounds()
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
Data science time! April 2019 and salary with experience
Should we burninate the [wrap] tag?
The Ask Question Wizard is Live!How do JavaScript closures work?How can I upload files asynchronously?How do I check if an element is hidden in jQuery?How do I remove a property from a JavaScript object?How do I redirect to another webpage?How can I get query string values in JavaScript?How do I include a JavaScript file in another JavaScript file?How to check whether a string contains a substring in JavaScript?How do I remove a particular element from an array in JavaScript?How do I return the response from an asynchronous call?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
Does anyone know what could be causing the following error when trying to create a leaflet map? It has something to do with the custom CRS. I can't post much of the code for various reasons so if someone can point me in the right direction, I will greatly appreciate it.
this._map.getPixelWorldBounds() is null
L.map(containerId,
maxBounds: L.latLngBounds(L.latLng(-90, -180), L.latLng(90,180)),
maxZoom: 15,
minZoom: 1,
center: centerLatLng,
zoom: 2,
crs: getCrs(),
worldCopyJump: true,
zoomControl: false,
attributionControl: false
);
function getCrs()
return new L.Proj.CRS('EPSG:4326', '+proj=longlat +datum=WGS84 +no_defs',
origin: [-180, 90],
tileSize: 512,
resolutions: [...]
);
//Removed resolutions for brevity.
javascript reactjs leaflet proj4js
add a comment |
Does anyone know what could be causing the following error when trying to create a leaflet map? It has something to do with the custom CRS. I can't post much of the code for various reasons so if someone can point me in the right direction, I will greatly appreciate it.
this._map.getPixelWorldBounds() is null
L.map(containerId,
maxBounds: L.latLngBounds(L.latLng(-90, -180), L.latLng(90,180)),
maxZoom: 15,
minZoom: 1,
center: centerLatLng,
zoom: 2,
crs: getCrs(),
worldCopyJump: true,
zoomControl: false,
attributionControl: false
);
function getCrs()
return new L.Proj.CRS('EPSG:4326', '+proj=longlat +datum=WGS84 +no_defs',
origin: [-180, 90],
tileSize: 512,
resolutions: [...]
);
//Removed resolutions for brevity.
javascript reactjs leaflet proj4js
reactjs.org/docs/handling-events.html
– bennygenel
Oct 3 '17 at 18:34
1
thanks. I can't get to that site at the moment - but i will check it out as soon as I can. I did change my getCrs() to L.CRS.EPSG4326 and it fixed the error. I guess I need to check that custom function to see why its causing the issue.
– Abu Sulaiman
Oct 3 '17 at 18:44
add a comment |
Does anyone know what could be causing the following error when trying to create a leaflet map? It has something to do with the custom CRS. I can't post much of the code for various reasons so if someone can point me in the right direction, I will greatly appreciate it.
this._map.getPixelWorldBounds() is null
L.map(containerId,
maxBounds: L.latLngBounds(L.latLng(-90, -180), L.latLng(90,180)),
maxZoom: 15,
minZoom: 1,
center: centerLatLng,
zoom: 2,
crs: getCrs(),
worldCopyJump: true,
zoomControl: false,
attributionControl: false
);
function getCrs()
return new L.Proj.CRS('EPSG:4326', '+proj=longlat +datum=WGS84 +no_defs',
origin: [-180, 90],
tileSize: 512,
resolutions: [...]
);
//Removed resolutions for brevity.
javascript reactjs leaflet proj4js
Does anyone know what could be causing the following error when trying to create a leaflet map? It has something to do with the custom CRS. I can't post much of the code for various reasons so if someone can point me in the right direction, I will greatly appreciate it.
this._map.getPixelWorldBounds() is null
L.map(containerId,
maxBounds: L.latLngBounds(L.latLng(-90, -180), L.latLng(90,180)),
maxZoom: 15,
minZoom: 1,
center: centerLatLng,
zoom: 2,
crs: getCrs(),
worldCopyJump: true,
zoomControl: false,
attributionControl: false
);
function getCrs()
return new L.Proj.CRS('EPSG:4326', '+proj=longlat +datum=WGS84 +no_defs',
origin: [-180, 90],
tileSize: 512,
resolutions: [...]
);
//Removed resolutions for brevity.
javascript reactjs leaflet proj4js
javascript reactjs leaflet proj4js
edited Oct 4 '17 at 18:04
Abu Sulaiman
asked Oct 3 '17 at 17:50
Abu SulaimanAbu Sulaiman
85511126
85511126
reactjs.org/docs/handling-events.html
– bennygenel
Oct 3 '17 at 18:34
1
thanks. I can't get to that site at the moment - but i will check it out as soon as I can. I did change my getCrs() to L.CRS.EPSG4326 and it fixed the error. I guess I need to check that custom function to see why its causing the issue.
– Abu Sulaiman
Oct 3 '17 at 18:44
add a comment |
reactjs.org/docs/handling-events.html
– bennygenel
Oct 3 '17 at 18:34
1
thanks. I can't get to that site at the moment - but i will check it out as soon as I can. I did change my getCrs() to L.CRS.EPSG4326 and it fixed the error. I guess I need to check that custom function to see why its causing the issue.
– Abu Sulaiman
Oct 3 '17 at 18:44
reactjs.org/docs/handling-events.html
– bennygenel
Oct 3 '17 at 18:34
reactjs.org/docs/handling-events.html
– bennygenel
Oct 3 '17 at 18:34
1
1
thanks. I can't get to that site at the moment - but i will check it out as soon as I can. I did change my getCrs() to L.CRS.EPSG4326 and it fixed the error. I guess I need to check that custom function to see why its causing the issue.
– Abu Sulaiman
Oct 3 '17 at 18:44
thanks. I can't get to that site at the moment - but i will check it out as soon as I can. I did change my getCrs() to L.CRS.EPSG4326 and it fixed the error. I guess I need to check that custom function to see why its causing the issue.
– Abu Sulaiman
Oct 3 '17 at 18:44
add a comment |
1 Answer
1
active
oldest
votes
I had exactly this issue adding EPSG:32661 support to Leaflet by using Proj4Leaflet.
Uncaught TypeError: Cannot read property 'getSize' of null
at NewClass._onZoomEnd (leaflet-src.js?8af6:13235)
at NewClass.whenReady (leaflet-src.js?8af6:4450)
at NewClass.addHooks (leaflet-src.js?8af6:13157)
at NewClass.enable (leaflet-src.js?8af6:5722)
at NewClass.addHandler (leaflet-src.js?8af6:3736)
at NewClass.init (leaflet-src.js?8af6:385)
at NewClass.proto.callInitHooks (leaflet-src.js?8af6:357)
at NewClass.initialize (leaflet-src.js?8af6:3148)
at new NewClass (leaflet-src.js?8af6:301)
at Map.createLeafletElement (Map.js?fe6c:87)
I found that the issue is raised by usage of worldCopyJump. By removing it the error disappear.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f46550541%2fhow-can-i-resolve-this-leaflet-error-getpixelworldbounds%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I had exactly this issue adding EPSG:32661 support to Leaflet by using Proj4Leaflet.
Uncaught TypeError: Cannot read property 'getSize' of null
at NewClass._onZoomEnd (leaflet-src.js?8af6:13235)
at NewClass.whenReady (leaflet-src.js?8af6:4450)
at NewClass.addHooks (leaflet-src.js?8af6:13157)
at NewClass.enable (leaflet-src.js?8af6:5722)
at NewClass.addHandler (leaflet-src.js?8af6:3736)
at NewClass.init (leaflet-src.js?8af6:385)
at NewClass.proto.callInitHooks (leaflet-src.js?8af6:357)
at NewClass.initialize (leaflet-src.js?8af6:3148)
at new NewClass (leaflet-src.js?8af6:301)
at Map.createLeafletElement (Map.js?fe6c:87)
I found that the issue is raised by usage of worldCopyJump. By removing it the error disappear.
add a comment |
I had exactly this issue adding EPSG:32661 support to Leaflet by using Proj4Leaflet.
Uncaught TypeError: Cannot read property 'getSize' of null
at NewClass._onZoomEnd (leaflet-src.js?8af6:13235)
at NewClass.whenReady (leaflet-src.js?8af6:4450)
at NewClass.addHooks (leaflet-src.js?8af6:13157)
at NewClass.enable (leaflet-src.js?8af6:5722)
at NewClass.addHandler (leaflet-src.js?8af6:3736)
at NewClass.init (leaflet-src.js?8af6:385)
at NewClass.proto.callInitHooks (leaflet-src.js?8af6:357)
at NewClass.initialize (leaflet-src.js?8af6:3148)
at new NewClass (leaflet-src.js?8af6:301)
at Map.createLeafletElement (Map.js?fe6c:87)
I found that the issue is raised by usage of worldCopyJump. By removing it the error disappear.
add a comment |
I had exactly this issue adding EPSG:32661 support to Leaflet by using Proj4Leaflet.
Uncaught TypeError: Cannot read property 'getSize' of null
at NewClass._onZoomEnd (leaflet-src.js?8af6:13235)
at NewClass.whenReady (leaflet-src.js?8af6:4450)
at NewClass.addHooks (leaflet-src.js?8af6:13157)
at NewClass.enable (leaflet-src.js?8af6:5722)
at NewClass.addHandler (leaflet-src.js?8af6:3736)
at NewClass.init (leaflet-src.js?8af6:385)
at NewClass.proto.callInitHooks (leaflet-src.js?8af6:357)
at NewClass.initialize (leaflet-src.js?8af6:3148)
at new NewClass (leaflet-src.js?8af6:301)
at Map.createLeafletElement (Map.js?fe6c:87)
I found that the issue is raised by usage of worldCopyJump. By removing it the error disappear.
I had exactly this issue adding EPSG:32661 support to Leaflet by using Proj4Leaflet.
Uncaught TypeError: Cannot read property 'getSize' of null
at NewClass._onZoomEnd (leaflet-src.js?8af6:13235)
at NewClass.whenReady (leaflet-src.js?8af6:4450)
at NewClass.addHooks (leaflet-src.js?8af6:13157)
at NewClass.enable (leaflet-src.js?8af6:5722)
at NewClass.addHandler (leaflet-src.js?8af6:3736)
at NewClass.init (leaflet-src.js?8af6:385)
at NewClass.proto.callInitHooks (leaflet-src.js?8af6:357)
at NewClass.initialize (leaflet-src.js?8af6:3148)
at new NewClass (leaflet-src.js?8af6:301)
at Map.createLeafletElement (Map.js?fe6c:87)
I found that the issue is raised by usage of worldCopyJump. By removing it the error disappear.
answered Mar 8 at 17:18
keulkeul
5,7451130
5,7451130
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f46550541%2fhow-can-i-resolve-this-leaflet-error-getpixelworldbounds%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
reactjs.org/docs/handling-events.html
– bennygenel
Oct 3 '17 at 18:34
1
thanks. I can't get to that site at the moment - but i will check it out as soon as I can. I did change my getCrs() to L.CRS.EPSG4326 and it fixed the error. I guess I need to check that custom function to see why its causing the issue.
– Abu Sulaiman
Oct 3 '17 at 18:44