Pessimistress Github contribution chart
Pessimistress Github Stats
Pessimistress Most Used Languages

Activity

28 Sep 2022

Issue Comment

Pessimistress

Error: mvt loader - no parser found and worker is disabled - Electron app

Description

tile-layer.ts:32 Error: mvt loader - no parser found and worker is disabled
    at parseWithLoader (parse.ts:100:1)
    at async parse (parse.ts:58:1)
    at async load (load.ts:48:1)
    at async Tile2DHeader._loadData (tile-2d-header.ts:107:1) 

image

I am getting this error with this piece of code using electron. It works fine on Chrome.

new CartoLayer({
        index: 'NDVI',
        id: `ColorLayer${Math.random()}`,
        type: MAP_TYPES.TILESET,
        connection: env.process.connection,
        data: `env.process.project.${tableName}`,
        lineWidthScale: 0.2,
        getLineColor: [255, 255, 255, 100],
}), 

Flavors

  • [X] React
  • [ ] Python/Jupyter notebook
  • [ ] MapboxLayer
  • [ ] GoogleMapsOverlay
  • [X] CartoLayer
  • [ ] DeckLayer/DeckRenderer for ArcGIS

Expected Behavior

No response

Steps to Reproduce

electron version 19.0.4

Environment

  • Framework version:
  • Browser:
  • OS:

Logs

No response

Forked On 28 Sep 2022 at 09:55:40

Pessimistress

https://deck.gl/docs/developer-guide/loading-data#loaders-and-web-workers

Commented On 28 Sep 2022 at 09:55:40

Pessimistress

Deploying to gh-pages from @ 293076d979559b64567baebfa449f1437224760c 🚀

Pushed On 26 Sep 2022 at 06:23:07
Issue Comment

Pessimistress

[Bug]import { MapboxLayer } from '@deck.gl/mapbox' error

Description

import { MapboxLayer } from '@deck.gl/mapbox' error in my ts file

The declaration file for module '@deck.gl/mapbox' could not be found.“/node_modules/.pnpm/@deck.gl+mapbox@8.8.11/node_modules/@deck.gl/mapbox/dist/es5/index.js”Implicitly owns type "any". Try using npm i --save-dev @types/deck.gl__mapbox if it exists, or add a new declaration (.d.ts) file ts containing declare module '@deck.gl/mapbox'; (7016)

i tried npm i
npm i --save-dev @types/deck.gl__mapbox

I looked at the @deck.gl/mapbox source it's written in typescript,

But I can't directly import

Flavors

  • [ ] React
  • [ ] Python/Jupyter notebook
  • [X] MapboxLayer
  • [ ] GoogleMapsOverlay
  • [ ] CartoLayer
  • [ ] DeckLayer/DeckRenderer for ArcGIS

Expected Behavior

import { MapboxLayer } from '@deck.gl/mapbox' success

like importing other typescript packages

Steps to Reproduce

npm i @deck.gl/mapbox create ts file import { MapboxLayer } from '@deck.gl/mapbox'

Environment

  • Framework version:"@deck.gl/mapbox": "^8.8.11",
  • typescript version 4.8.3

Logs

No response

Forked On 24 Sep 2022 at 10:14:46

Pessimistress

https://deck.gl/docs/get-started/using-with-typescript

Commented On 24 Sep 2022 at 10:14:46
Issue Comment

Pessimistress

[Bug] Marker offset outside map when crossing longitude 180 -> -180

Description

I have my deckgl map zoomed out to see most of the globe, and I have a <Marker /> located somewhere in Indonesia (lat -3.8, lon 102), where my map is initially centered at. As I pan the map horizontally (dragging my mouse left i.e. longitude increasing), when the longitude cross somewhere in the middle of the Pacific Ocean, the centre of the map's longitude jumps to -180, and my points disappear. I debugged and have the NW / SE points plotted based on the bounds calculated by new WebMercatorViewport().getBounds(), and noticed that the EW longitudes jump from to (272, 61) to (-69, -280). Should these be within the ranges of (-180, 180)? I expect to see my markers on the map while the locations are still there, as I noticed that the points are all the way to the right outside the view of the visible map.

Flavors

  • [X] React
  • [ ] Python/Jupyter notebook
  • [ ] MapboxLayer
  • [ ] GoogleMapsOverlay
  • [ ] CartoLayer
  • [ ] DeckLayer/DeckRenderer for ArcGIS

Expected Behavior

Expect to see the marker remain on the map while in view

Steps to Reproduce

See description

Environment

  • Framework version: deck.gl@^8.6.0
  • Browser: Chrome 89.0
  • OS: Windows 10

Logs

No response

Forked On 23 Sep 2022 at 11:23:27

Pessimistress

wrapLongitude MapView:repeat

Commented On 23 Sep 2022 at 11:23:27
Merge

Pessimistress

Display helpful error if h3 v4 is accidentally included

Follow up to https://github.com/visgl/deck.gl/pull/7058 and https://github.com/visgl/deck.gl/pull/7177

If no version is explictly specified for the H3 library deck.gl, v4 is automatically included and leads to misleading errors. Many existing scripts out there include h3 without the version explictly set to v3.

Change List

  • Detect v4 and warn user

Forked On 23 Sep 2022 at 09:11:23

Pessimistress

Too verbose? `Incompatible h3-js version. ${installHelp}`
On 23 Sep 2022 at 09:11:23

Pessimistress

Display helpful error if h3 v4 is accidentally included

Follow up to https://github.com/visgl/deck.gl/pull/7058 and https://github.com/visgl/deck.gl/pull/7177

If no version is explictly specified for the H3 library deck.gl, v4 is automatically included and leads to misleading errors. Many existing scripts out there include h3 without the version explictly set to v3.

Change List

  • Detect v4 and warn user

Merged On 23 Sep 2022 at 09:11:24

Pessimistress

Commented On 23 Sep 2022 at 09:11:24

Pessimistress

Link to deck.gl-raster

Doc links

Merged On 23 Sep 2022 at 09:07:25

Pessimistress

Commented On 23 Sep 2022 at 09:07:25
Issue Comment

Pessimistress

Why do not support onMouseEnter and onMouseLeave

Target Use Case

<Map // No effect onMouseEnter={(e) => { e.target.getCanvas().style.cursor = "pointer"; }} // No effect onMouseLeave={(e) => { e.target.getCanvas().style.cursor = "unset"; }} // Effective // onMouseOver={(e) => { // e.target.getCanvas().style.cursor = "pointer"; // }} // Effective // onMouseOut={(e) => { // e.target.getCanvas().style.cursor = "unset"; // }}

...

Proposal

You can not support onMouseEnter and onMouseLeave, but why support Over&Out, I just don't understand

Forked On 21 Sep 2022 at 11:10:48

Pessimistress

Please, read the documentation. If you have trouble understanding it, go to Discussions.

Commented On 21 Sep 2022 at 11:10:48
Issue Comment

Pessimistress

[Bug] React Portal is not working with NavigationControl

Description

I need to put NavigationControl component in other div of the application. I'm trying to use React Portal to do that but it is not working. In older versions I can have that behaviour but in react-map-gl: 7.0.19 is not working

Expected Behavior

React Portal should work with NavigationControl

Steps to Reproduce

Example of the code (it is not the full code):

<DeckGL
.....someProps
>
   <ReactMapGL
     ...moreProps>
            React.createPortal(<NavigationControl />, container) => this does not work

   </ReactMapGL>
</<DeckGL> 

Environment

  • Framework version: 7.0.19 and deck.gl 8.8.9
  • Map library: maplibre 2.4.0
  • Browser: Chrome 105
  • OS: Windows 10

Logs

No response

Forked On 21 Sep 2022 at 08:45:14

Pessimistress

This is expected. v7 no longer renders controls in React. The components are simply wrappers of the official controls and they don't return any React nodes.

As the upgrade guide notes, if you want to use the control components as children of DeckGL, you need to use v5 or v6.

Commented On 21 Sep 2022 at 08:45:14
Issue Comment

Pessimistress

globe

Target Use Case

projection: { name: 'globe' // display the map as a 3D globe },

Proposal

u know, you need to add a new characteristic value of the name attribute of the project

Forked On 21 Sep 2022 at 08:41:27

Pessimistress

#1906

Commented On 21 Sep 2022 at 08:41:27
Issue Comment

Pessimistress

[Bug] mapRef.fitBounds doesn't respect minZoom

Description

When using mapRef.fitBounds(bounds) and setting minZoom option, I expect the map to fly to the given bounds, but never crossing the specified zoom level.

I'm getting a locations' bounding box, which I want to zoom in on, but never closer than zoom level "x".

https://user-images.githubusercontent.com/7780722/191261920-1fac7d65-f1a8-45af-b029-a36912cfc408.mp4

Please refer to Codesandbox reproduction, and click "fly to location" button. It's using maplibre-gl to avoid sharing tokens, but the same problem occurs when using mapbox-gl.

Ps. since the minZoom option is typed on fitBounds I'm assuming this is a bug. Please consider this a feature request if this is not intended use.

Expected Behavior

No response

Steps to Reproduce

Cal fitBounds with minZoom option, like so:

const { mapRef } = useMap();
// stuff
const bounds = [
    {
        "lat": 52.3630883,
        "lon": 4.6179566
    },
    {
        "lat": 52.363145,
        "lon": 4.6179952
    }
]
mapRef.fitBounds(bounds, { minZoom: 20 }); 

Environment

  • Framework version: react-map-gl@7.0.19
  • Map library: maplibre-gl@2.1.9
  • Browser: Chrome 105
  • OS: MacOS 12.3 Monterey

Logs

No response

Forked On 21 Sep 2022 at 08:40:53

Pessimistress

but never crossing the specified zoom level

Sounds to me you want maxZoom, not minZoom.

Either way, you are calling a mapbox-gl API. If you think there is a bug, you need to report it to the Mapbox GL JS repo.

Commented On 21 Sep 2022 at 08:40:53
Issue Comment

Pessimistress

IconLayer's PickInfo does not include object when data iterable is a Map

Description

When using IconLayer's onClick or onHover properties, the PickInfo argument of the callback should include the object from the data. When the data property is an array this works fine, but when the data property is a Map the object is missing.

Flavors

  • [X] React
  • [ ] Python/Jupyter notebook
  • [ ] MapboxLayer
  • [ ] GoogleMapsOverlay
  • [ ] CartoLayer
  • [ ] DeckLayer/DeckRenderer for ArcGIS

Expected Behavior

The PickInfo argument should include the data object when using any Iterable for the data property, not just when it is an array.

Steps to Reproduce

Reproduced in the following code sandbox: https://codesandbox.io/s/competent-smoke-enxlcx?file=/src/App.tsx

Hover over the two different icons to see the PickInfo logged to the console for both scenarios.

Environment

  • Framework version: 8.3.10

Logs

No response

Forked On 20 Sep 2022 at 08:46:33

Pessimistress

This is expected. The picked index is used to retrieve object as data[index]. If your data is not an array then it's not going to be populated. You can still get the object yourself with something like Array.from(data)[info.index]. Indexing into arbitrary iterables is unlikely to be supported out of the box because it will have a significant impact on the picking performance.

Commented On 20 Sep 2022 at 08:46:33

Pessimistress

Fix bug-report-link

Change List

  • Fix bug-report issues link

Merged On 18 Sep 2022 at 07:42:10

Pessimistress

Commented On 18 Sep 2022 at 07:42:10

Pessimistress

V8.5.16

Created On 17 Sep 2022 at 08:42:14

Pessimistress

Deploying to gh-pages from @ f70e8c354aee34949134f9e802f59cf60db4de19 🚀

Pushed On 16 Sep 2022 at 11:56:44

Pessimistress

Deploying to gh-pages from @ 76ced65f501ad79b75442b588ff129efadd8c536 🚀

Pushed On 15 Sep 2022 at 06:56:31
Merge

Pessimistress

[website] Add Maplibre as speaker to madrid summit
Forked On 15 Sep 2022 at 06:24:48

Pessimistress

Committee
On 15 Sep 2022 at 06:24:48

Pessimistress

[website] Add Maplibre as speaker to madrid summit
Merged On 15 Sep 2022 at 06:25:44

Pessimistress

Commented On 15 Sep 2022 at 06:25:44
Issue Comment

Pessimistress

[Bug] Error and no map display when attempting to set baseApiUrl

Description

When I attempt to set the baseApiUrl for a react-map-gl Map I get a setting getter-only property "baseApiUrl" error and no map display.

Here is my example code.

import * as React from 'react';
import Map from 'react-map-gl';

function App() {
  return <Map
    initialViewState={{
      longitude: -100,
      latitude: 40,
      zoom: 3.5
    }}
    style={{width: '100vw', height: '100vh'}}
    mapStyle="mapbox://styles/mapbox/streets-v9"
    mapboxAccessToken="MY_ACCESS_TOKEN"
    baseApiUrl="https://example.com
  />;
} 

The error I get is

TypeError: setting getter-only property "baseApiUrl"
setGlobals                                                                                                                              set-globals.ts:34
Map                                                                                                                                         map.tsx:96
promise callback*/node_modules/react-map-gl/dist/esm/components/map.js/Map</<     map.tsx:81
... 

Expected Behavior

I expect baseApiUrl to use the set baseApiUrl in requests, not error, out and display the map.

Steps to Reproduce

Just set the Map's baseApiUrl to anything.

Environment

  • Framework version: react-map-gl@7.0.19
  • Map library: mapbox-gl@2.10.0
  • Browser: Firefox 98.0.2
  • OS: Ubuntu 20.04.4 LTS

Logs

TypeError: setting getter-only property "baseApiUrl"
setGlobals                                                                                                                              set-globals.ts:34
Map                                                                                                                                         map.tsx:96
promise callback*/node_modules/react-map-gl/dist/esm/components/map.js/Map</<     map.tsx:81 

Forked On 15 Sep 2022 at 03:21:45

Pessimistress

Please click the link in my comment. mapLib prop is default to import('mapbox-gl'). You can remove the dynamic import by

import mapboxgl from 'mapbox-gl';

<Map mapLib={mapboxgl} ... /> 

Commented On 15 Sep 2022 at 03:21:45
Issue Comment

Pessimistress

[Bug] Error and no map display when attempting to set baseApiUrl

Description

When I attempt to set the baseApiUrl for a react-map-gl Map I get a setting getter-only property "baseApiUrl" error and no map display.

Here is my example code.

import * as React from 'react';
import Map from 'react-map-gl';

function App() {
  return <Map
    initialViewState={{
      longitude: -100,
      latitude: 40,
      zoom: 3.5
    }}
    style={{width: '100vw', height: '100vh'}}
    mapStyle="mapbox://styles/mapbox/streets-v9"
    mapboxAccessToken="MY_ACCESS_TOKEN"
    baseApiUrl="https://example.com
  />;
} 

The error I get is

TypeError: setting getter-only property "baseApiUrl"
setGlobals                                                                                                                              set-globals.ts:34
Map                                                                                                                                         map.tsx:96
promise callback*/node_modules/react-map-gl/dist/esm/components/map.js/Map</<     map.tsx:81
... 

Expected Behavior

I expect baseApiUrl to use the set baseApiUrl in requests, not error, out and display the map.

Steps to Reproduce

Just set the Map's baseApiUrl to anything.

Environment

  • Framework version: react-map-gl@7.0.19
  • Map library: mapbox-gl@2.10.0
  • Browser: Firefox 98.0.2
  • OS: Ubuntu 20.04.4 LTS

Logs

TypeError: setting getter-only property "baseApiUrl"
setGlobals                                                                                                                              set-globals.ts:34
Map                                                                                                                                         map.tsx:96
promise callback*/node_modules/react-map-gl/dist/esm/components/map.js/Map</<     map.tsx:81 

Forked On 15 Sep 2022 at 07:18:25

Pessimistress

If there is a limitation of mapbox-gl then there's nothing we can do, however you do not have to use dynamic import. See mapLib.

Commented On 15 Sep 2022 at 07:18:25

Pessimistress

Deploying to gh-pages from @ 920ac188cb86f2d1afe2e9ecd1b3b013fc52f35c 🚀

Pushed On 13 Sep 2022 at 06:35:51
Issue Comment

Pessimistress

HexagonLayer cannot get bar height

Description

Hi, I am using HexagonLayer in pydeck_chart. My data is a 3 column dataframe, ['lat','lon','number of clients']. I got the map and points successfully, but I am hoping they are par plot to show number of clients. The number of clients ranges from 1 to 50. But the map I got didn't show height differences. Here is my code.

st.pydeck_chart(pdk.Deck( map_style=None, initial_view_state=pdk.ViewState( latitude= np.mean(zip_all['lat']), longitude= np.mean(zip_all['lon']), zoom=11, pitch=50, ), layers=[ pdk.Layer( 'HexagonLayer', data=zip_all, get_position=["lon","lat"], radius=200, elevation_scale=50, elevation_range=[0, 100], pickable=True, extruded=True, auto_highlight=True, ) ] ))

I am eager for the solution. Thanks for your help. #[Bug]

Flavors

  • [ ] React
  • [X] Python/Jupyter notebook
  • [ ] MapboxLayer
  • [ ] GoogleMapsOverlay
  • [ ] CartoLayer
  • [X] DeckLayer/DeckRenderer for ArcGIS

Expected Behavior

Could you please help me find the problems in my code?

Steps to Reproduce

A sample of your code

Environment

  • Framework version:deck.gl@8.3.0
  • Browser:Chrome 78.0
  • OS: iOS 15.1

Logs

No response

Forked On 13 Sep 2022 at 06:13:58

Pessimistress

Issues are for reporting bugs in the library. Please use Discussions to get help.

Commented On 13 Sep 2022 at 06:13:58