Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 10 13:38
    Creaticide edited #1919
  • Aug 10 13:38
    Creaticide opened #1919
  • Aug 09 21:20

    ZakarFin on develop

    Style tuning. Merge pull request #1918 from C… (compare)

  • Aug 09 21:20
    ZakarFin closed #1918
  • Aug 09 21:19
    ZakarFin milestoned #1918
  • Aug 09 08:16
    Creaticide opened #1918
  • Aug 06 06:00
    dependabot[bot] labeled #869
  • Aug 06 06:00
    dependabot[bot] opened #869
  • Aug 06 06:00

    dependabot[bot] on maven

    Bump postgresql from 42.3.3 to … (compare)

  • Aug 05 21:29
    ZakarFin milestoned #1912
  • Aug 05 21:27
    ZakarFin closed #1910
  • Aug 05 21:27

    ZakarFin on develop

    disable div option for chorople… Merge pull request #1910 from o… (compare)

  • Aug 05 21:27
    ZakarFin milestoned #1910
  • Aug 05 21:26

    ZakarFin on develop

    use empty array as default for … Merge pull request #1911 from o… (compare)

  • Aug 05 21:26
    ZakarFin closed #1911
  • Aug 05 21:26
    ZakarFin milestoned #1911
  • Aug 05 21:24

    ZakarFin on develop

    Disable hover when swipe tool i… Merge pull request #1913 from C… (compare)

  • Aug 05 21:24
    ZakarFin closed #1913
  • Aug 05 21:23
    ZakarFin milestoned #1913
  • Aug 05 21:15

    ZakarFin on develop

    Changes to print notifications. Merge pull request #1915 from C… (compare)

amilcar-uptech
@amilcar-uptech
Ok. That'd be helpful.
amilcar-uptech
@amilcar-uptech

Hello. After building a sample app, I get the following message in the console:

logger.es6.js:26 Loader: Bundle wasn't preloaded nor registered as dynamic. Skipping  sample-info

Am I missing something?

Sami Mäkinen
@ZakarFin
It's this: https://github.com/oskariorg/sample-application/blob/master/bundles/sample/sample-info/instance.js but you probably don't want it anyway. It just adds the guided tour step that is giving the user the default credentials for user/admin
Basically what happens is that your database has a record that wants to start that bundle, but it's not built/included in the oskari.min.js. If you want to make it available you should link it like this on the applications main.js: https://github.com/oskariorg/sample-application/blob/master/applications/geoportal/main.js#L44
But instead you probably want to remove the reference to it from the oskari_appsetup_bundles database table or just ignore it
image.png
It adds ^ this step to the guided tour
Sami Mäkinen
@ZakarFin
Btw about that earlier question for selecting default layers for the geoportal. You can use this functionality:
image.png
When you click the "Set as default view" it updates the default view to the center location and zoom that the map is at that point and also the layers that are on the map when you click it
Sami Mäkinen
@ZakarFin
Or you can check the database with SELECT state FROM oskari_appsetup_bundles WHERE bundle_id IN (SELECT id FROM oskari_bundle WHERE name='mapfull'). It should have a selectedLayers array. The array has objects that present layers. If you change the id value of the object it changes the layer on that appsetup. The id on the selectedLayers is reference to oskari_maplayer table id.
amilcar-uptech
@amilcar-uptech
Thanks! I eventually figured it wasn't linked on the main.js file, so it seems to be working now! I do want for the purposes of adding an extra step for our instance, so it's fine.
I'll look into the default layer/view configuration next.
amilcar-uptech
@amilcar-uptech
I'm trying to set the priority for this bundle, and I noticed the highest one from a regular installation goes up to 110. I've tried setting it higher than that (eg. 111, 120, 500, 1000), but every time I try to get to it as a last step, the quick guide seems to break (I can no longer go forward, therefore the info isn't shown, nor can I go backwards), and the console throws the following:
polyfills-es2015.js:1 Uncaught TypeError: a.append is not a function
    at Oskari.clazz.define.__name._showGuideContentForStep (instance.js:199:25)
    at Oskari.clazz.define.__name._moveGuideStep (instance.js:244:18)
    at HTMLInputElement.__zone_symbol__ON_PROPERTYclick (instance.js:292:28)
    at HTMLInputElement.T (polyfills-es2015.js:1:40456)
    at s.invokeTask (polyfills-es2015.js:1:31585)
    at i.runTask (polyfills-es2015.js:1:27091)
    at c.invokeTask [as invoke] (polyfills-es2015.js:1:32586)
    at l (polyfills-es2015.js:1:44194)
    at HTMLInputElement.p (polyfills-es2015.js:1:44439)
If I set priority to 110, the quick guide works fine, but the sample-info bundle shows as the second-to-last step.
Sami Mäkinen
@ZakarFin
Ok, looks like the last step refers to the xy-tool so it’s propably pushed to the guidedtour by it. So it should work but you would have to debug it to see why it’s not on your case
amilcar-uptech
@amilcar-uptech
Hello again. I'm trying to check the default view thing, but I'm using 1.55.2. What would be the equivalent table for oskari_appsetup_bundles in this case?
Solantoast
@Solantoast
Hi, I'm using the RPC client for Oskari to display pins for certain locations on a map. I'm having an issue where all the features disappear when the map's reset button is interacted with. Wondering if there's something I might be doing wrong here as I see them briefly after every subsequent reset. I have added a vector layer before adding the features, and they show up nicely before resetting the map.
Sami Mäkinen
@ZakarFin
@amilcar-capsus it’s something like portti_view_bundle_seq
@Solantoast I think you’ve found a case where the reset isn’t functioning intuitively. It’s mostly used/tested on the geoportal side for reseting the state but with RPC it can quickly become something that feels ”buggy”. As the state of the map is reset any features/markers pushed through the RPC API should be removed as well. I’m not sure what happens on your case if they pop up again on the map
It mighy be that the markers aren’t removed but quickly blink before the layer they are on is moved ”behind” the basemap
Sami Mäkinen
@ZakarFin
But would need to dig a bit deeper into it to find out what happens. How do you think the reset should function on this kind of use case? Should there be some flag to warn the RPC client about the reset or should the markers/features pushed through RPC not be removed on reset?
Solantoast
@Solantoast
I would love for the markers/features to stay in place after the reset, but that's just my particular use case. I was also originally looking for an event that might fire when the reset has happened. I could just add the features back after the reset has happened.
Sami Mäkinen
@ZakarFin
True, seems reasonable. The event would be pretty easy to add, but have to think on it a bit if we there’s a nice way we could ignore things pushed on the map through rpc
amilcar-uptech
@amilcar-uptech
Okay, so I have two pairs of the layers I want to show. I think one is for WMS and another for WFS, but I'm not sure. When trying to use them for the default view, only the WMS seems to work for it, as the WFS aren't showing and I get the following on the logs:
. . .
2022-04-16 00:08:15,845 WARN  AUDIT - {"msg":"Session expired","op":"UNAUTHORIZED","resource":"GENERIC","ip":"177.247.102.148","params":{"action_route":["GetWFSFeatures"],"id":["28"],"srs":["EPSG:3857"],"bbox":["12249492.403164063,-821850.9280078113,12288628.161640625,-802283.04876953"],"_":["1650038891529"]}} 
2022-04-16 00:08:15,845 ERROR fi.nls.oskari.AjaxController - Action was denied: GetWFSFeatures , Error msg: Session expired . Parameters:  {action_route=[GetWFSFeatures],id=[28],srs=[EPSG:3857],bbox=[12288628.161640625,-782715.1695312485,12327763.920117188,-763147.2902929672],_=[1650038891530]} 
2022-04-16 00:08:15,846 WARN  AUDIT - {"msg":"Session expired","op":"UNAUTHORIZED","resource":"GENERIC","ip":"177.247.102.148","params":{"action_route":["GetWFSFeatures"],"id":["28"],"srs":["EPSG:3857"],"bbox":["12288628.161640625,-782715.1695312485,12327763.920117188,-763147.2902929672"],"_":["1650038891530"]}} 
2022-04-16 00:08:15,846 WARN  AUDIT - {"msg":"Session expired","op":"UNAUTHORIZED","resource":"GENERIC","ip":"177.247.102.148","params":{"action_route":["GetWFSFeatures"],"id":["28"],"srs":["EPSG:3857"],"bbox":["12249492.403164063,-802283.0487695299,12288628.161640625,-782715.1695312486"],"_":["1650038891528"]}} 
2022-04-16 00:08:15,913 ERROR fi.nls.oskari.AjaxController - Action was denied: GetWFSFeatures , Error msg: Session expired . Parameters:  {action_route=[GetWFSFeatures],id=[28],srs=[EPSG:3857],bbox=[12288628.161640625,-821850.9280078113,12327763.920117188,-802283.04876953],_=[1650038891532]} 
2022-04-16 00:08:15,913 WARN  AUDIT - {"msg":"Session expired","op":"UNAUTHORIZED","resource":"GENERIC","ip":"177.247.102.148","params":{"action_route":["GetWFSFeatures"],"id":["28"],"srs":["EPSG:3857"],"bbox":["12288628.161640625,-821850.9280078113,12327763.920117188,-802283.04876953"],"_":["1650038891532"]}} 
. . .
However, I cannot edit the styles for the layers that I can visualize (WMS?). Is there something that can be done to either add styles to these layers? Or a way to allow visualization of the WFS layers (which I can edit the styles for)?
amilcar-uptech
@amilcar-uptech
Captura de Pantalla 2022-04-15 a la(s) 11.10.14.png
For reference, this is what I'm trying to visualize.
Sami Mäkinen
@ZakarFin
@amilcar-uptech For WMS you should configure styling on the service the layers are from (GeoServer or similar). If you need to change the styling at runtime you should probably use WFS. The log you pasted says "UNAUTHORIZED/session expired" so you might be using layers that are only allowed for logged in users/some specific role but are trying to use them as a guest/non-logged-in user.
hissakai
@hissakai

Hi! I'm publishing a map from Oskari with couple of layers. All layers has permissons that guests (and users) can view them in embedded map. However, there is still login "window" in map, in maptools -div. Still all layers are visible even i don't log in.

I'm wondering why, because this is not happening in my test environment.

Sami Mäkinen
@ZakarFin
Hi! There may be something wrong with the publish template in your database if you are getting the "geoportal" view in an embedded map url. Check what the value of page column is in your database with SELECT page from oskari_appsetup where type='PUBLISH'
Sami Mäkinen
@ZakarFin
it should match the name of the JSP file in the application. In the sample-server-extension the pages are here: https://github.com/oskariorg/sample-server-extension/tree/master/webapp-map/src/main/webapp/WEB-INF/jsp but the JSP for embedded maps is inherited from the default here: https://github.com/oskariorg/oskari-server/tree/master/servlet-map/src/main/resources/META-INF/resources/spring-map-jsp. So the SQL should return published. If not you can change that or if you want to overwrite the default you should remove the login functionality from the overriding JSP in your app.
This is assuming that you are using the publisherfunctionality when you say you are "publishing a map from Oskari"
image.png
This ^ is the publisher functionality
hissakai
@hissakai
Page column had wrong value. This solved the problem. Many thanks!
Sami Mäkinen
@ZakarFin
Great :+1:
Janne Heikkilä
@jampukka
Looks like Oskari 2.7.1 doesn't add username/password to WMS GetCapabilities requests, at least for the code path taken from action_route=ServiceCapabilities
fix is most probably L26 + info.setCredentials(user, pwd);
seeing 2.8.0-SNAPSHOT has refactored the code big time there's probably little interest to issueing 2.7.2 with this fixed
Janne Heikkilä
@jampukka
fix is most probably
yep that did the trick^
Sami Mäkinen
@ZakarFin
True, here's the commit I made earlier to fix it: oskariorg/oskari-server@c38e00f Unfortunately while doing the huge capabilities refactoring I didn't catch that the problem had already surfaced before we made the last release. Most WMS related changes were made for 2.7. And in 2.8 the whole codebase for capabilities parsing has been changed to the new implementation with a much more simpler way of doing this.
osqq
@osqq

Hi! How do I get the data from drawing events trough RPC? If I do a postRequest like:

channel.postRequest('DrawTools.StartDrawingRequest', data);

How do I call that id to get the geoJson for my application to use? There was some mention in the API but I couldn't find any examples where something like that was used.
Or was the RPC api example page source code somewhere to be viewed?

osqq
@osqq
Like if I want to do with something like the log does in the example page, get the drawn geojson after the drawing has finished?
The last one is the example page, but the listening of the event and logging it on the page is handled globally on the example app. Anyway you listen to the event like any other event on an RPC-based app
Listening to events on RPC has an example on the start page of the example app: https://oskari.org/examples/rpc-api/rpc_example.html#/
channel.handleEvent('MapClickedEvent', function(data) {
  alert('Map clicked!');
});