ChamplainTile signal "render-complete" doesn't use data type of the rendered callback.
Submitted by Rishi Raj Singh Jhelumi
I am caching POIs as in bug #731587. https://bugzilla.gnome.org/review?bug=731587&attachment=282181
But I am unable to pass the data (second parameter) to the emit function If I do, "tile.emit('render-complete', this.data, this.data.length, false);"
It throws """ (gnome-maps:12007): GLib-GObject-CRITICAL **: g_value_unset: assertion 'G_IS_VALUE (value)' failed (gnome-maps:12007): Gjs-WARNING **: JS ERROR: Error: Cannot convert non-null JS value to G_POINTER """
The render-complete signal assumes second argument to be of type pointer, but it may not be the case, for example, a list of POIs is a JSON String that needs to be cached.
Only passing "null" as second argument works, which is very hacky and potentially unsafe. "tile.emit('render-complete', null, this.data.length, false);"
So, I think that "render-complete" should use the data type of the argument that is passed to it. It may as well be a GJS bug, as it may not be able to convert String to gpointer. But, I wanted to get opinion from here first.
Can, it be made to take data-type of argument. ?? Please guide me, as how to approach it, as it is very crucial for the POI rendering and maps.