Page 1 of 1
Not enough memory in shdocvw browser control
Posted: Fri Feb 23, 2018 7:43 am
by Lauterfeld
Hi all,
we use the shdocvw browser activex control in our desktop app to work with xserver 1.x and leaflet.
Also we use the js's of Mr. Heilig from github to interact.
We have the problem that when we work a while in the map (just with some polylines of a route) we'll get the error in the pic1.
Für diesen Vorgang ist nicht genügend Speicher verfügbar
The error occurs in the leaflet-xserver.js at pic2.
Memory consumption of our app is also huge. I'm not sure if it is a cache problem in shdocvw or if it is an issue in leaflet-xserver.js. Our main html makes that at the beginning:
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta http-equiv="cache-control" content="no-cache">
Many thanks for any help,
Volker
Re: Not enough memory in shdocvw browser control
Posted: Fri Feb 23, 2018 9:34 am
by Oliver Heilig
Hello Volker,
referring to the sample
https://github.com/oliverheilig/leaflet-vb6
Looks like the single-tile overlay for the labels requires too much memory? What you could try:
Remove the foregroundLayer and check if it works without memory-error at:
https://github.com/oliverheilig/leaflet ... dex.js#L57
If it works, try setting
useCanvas: false when initializing the foreground layer:
https://github.com/oliverheilig/leaflet ... dex.js#L54
Generally i'd recommend xMap-2, because it doesn't require single-tile overlays, which is more memory-friendly.
Oli
Re: Not enough memory in shdocvw browser control
Posted: Tue Feb 27, 2018 2:55 pm
by Lauterfeld
Hi Oliver,
tanks a lot!
I tried out your proposals. They did work but the best memory result is to use xMap2.
But one question is left
How can I manipulate the profile for rendering?
In xMap1 I was able to change some entries in silkysand.ini for example. But how can I do that in xMap2?? I don't find it....
Regards,
Volker
Re: Not enough memory in shdocvw browser control
Posted: Tue Feb 27, 2018 3:00 pm
by Joost
Are you using the REST API? in that case you can add the parameter storedProfile=<value> to the URL.
A working example can be found at
https://xserver2-europe-eu-test.cloud.p ... index.html
Re: Not enough memory in shdocvw browser control
Posted: Tue Feb 27, 2018 3:05 pm
by Lauterfeld
Hi Joost,
yes I do so. Example:
xMap2Layer1 = new L.tileLayer("http://" + location.hostname + ":50000/services/rest/XMap/tile/{z}/{x}/{y}?size={tileSize}&storedProfile={profile}&layers={layers}", {
profile: 'silkysand',
layers: 'background,transport,labels',
subdomains: '1234',
minZoom: 0,
maxZoom: 22,
pane: 'tilePane',
tileSize: 256,
format: 'image/png',
opacity: 1,
unloadInvisibleTiles: true,
attribution: "© PTV-AG"
});
But how I can manipulate the silkysand-Profile? in xMap1 I edited the silkysand.ini serverside and for example I change colors of streets or made heights transparent,.... Is that still possible in xMap2?
Re: Not enough memory in shdocvw browser control
Posted: Tue Feb 27, 2018 3:42 pm
by Joost
This is not possible, the profiles are hard coded for now. Customer specific rendering profiles in on the wishlist for future development of xMap2, but nothing scheduled atm.
Re: Not enough memory in shdocvw browser control
Posted: Tue Feb 27, 2018 3:45 pm
by Lauterfeld
OK, thanks!