GithubHelp home page GithubHelp logo

Comments (8)

GeoffCapper avatar GeoffCapper commented on August 16, 2024

I have experienced this in the past, but I just tried to recreate it by rapidly zooming and panning and couldn't. This was on both the supplied demo app and my own one, though they are compiled from some code that hasn't made it to release yet so it could be that some changes over the recent past have resolved this. It could also be related to particular platforms and versions of Java? Sorry I can't offer more in the way of workarounds, perhaps if Rob is seeing the problem too he might have some ideas.

from gmapsfx.

andorhorvath avatar andorhorvath commented on August 16, 2024

Hello,
I have experienced this issue too. Rapid zooming with mouse wheel causes a few second unresponsiveness in the zooming process, while the mapView loads the new parts.

My env is Netbeans 8.0.2; win 8.1; maven 3.05; jdk1.8.0_65

Also prints out some interesting things:

Outstanding resource locks detected:
D3D Vram Pool: 536,146,668 used (99.9%), 536,870,912 target (100.0%), 536,870,912 max
515 total resources being managed
average resource age is 0.0 frames
0 resources at maximum supported age (0.0%)
511 resources marked permanent (99.2%)
2 resources have had mismatched locks (0.4%)
2 resources locked (0.4%)
511 resources contain interesting data (99.2%)
0 resources disappeared (0.0%)

After the exception below is raised, the application just goes on, you can work with the map.

If forced too much or again, it may raise exception:

java.lang.NullPointerException
	at com.sun.prism.impl.BaseContext.updateMaskTexture(BaseContext.java:231)
	at com.sun.prism.impl.ps.BaseShaderGraphics.renderShape(BaseShaderGraphics.java:482)
	at com.sun.prism.impl.BaseGraphics.fill(BaseGraphics.java:372)
	at com.sun.javafx.webkit.prism.WCGraphicsPrismContext$ClipLayer.render(WCGraphicsPrismContext.java:1442)
	at com.sun.javafx.webkit.prism.WCGraphicsPrismContext.renderLayer(WCGraphicsPrismContext.java:202)
	at com.sun.javafx.webkit.prism.WCGraphicsPrismContext.restoreStateInternal(WCGraphicsPrismContext.java:219)
	at com.sun.javafx.webkit.prism.WCGraphicsPrismContext.restoreState(WCGraphicsPrismContext.java:233)
	at com.sun.webkit.WebPage.paint2GC(WebPage.java:699)
	at com.sun.webkit.WebPage.paint(WebPage.java:665)
	at com.sun.javafx.sg.prism.web.NGWebView.renderContent(NGWebView.java:96)
	at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2053)
	at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1945)
	at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:235)
	at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:576)
	at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2053)
	at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1945)
	at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:235)
	at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:576)
	at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2053)
	at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1945)
	at com.sun.javafx.tk.quantum.ViewPainter.doPaint(ViewPainter.java:477)
	at com.sun.javafx.tk.quantum.ViewPainter.paintImpl(ViewPainter.java:330)
	at com.sun.javafx.tk.quantum.PresentingPainter.run(PresentingPainter.java:91)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
	at com.sun.javafx.tk.RenderJob.run(RenderJob.java:58)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:125)
	at java.lang.Thread.run(Thread.java:745)

Also after closing the app, maven says:
Final Memory: 18M/169M
I'm not sure from where this final memory thing is taken, I'm quite new to maven and javaFX also.

from gmapsfx.

GeoffCapper avatar GeoffCapper commented on August 16, 2024

This looks like a JavaFX problem. Similar things have shown up http://stackoverflow.com/questions/23467797/javafx-nullpointerexception-when-rendering-big-image for example, and the suggestion is setting the VM arguments as in the original post. A bit of slowness is to be expected, even Google Maps on the browser can experience this when zooming quickly, but the NPE is not so good. You should also update your java and see if that helps, it's up to 112 now, so 65 might be missing some fixes.

from gmapsfx.

andorhorvath avatar andorhorvath commented on August 16, 2024

Thanks, I will surely update my version.
Do you have any idea how could someone disable the mousewheel usage at the map (or in general), to avoid this? I couldn't find the javafx (or mapView or map or scene) function for it. I also couldn't find where this behavior (event handler or something) can be found, that makes this the way it is. Googling resulted that there is a function in Maps API v3 to achieve/disable this.
Could you guide me where to look to change gmapsfx to make this work?

Mine is a desktop java app (at the moment).
In the meantime I will try to find how to make those parameters work in my situation =]

from gmapsfx.

johnmc5810 avatar johnmc5810 commented on August 16, 2024

You can set scrollwheel to false, this worked for me. Zooming using buttons is ok and doesn't cause above issue.

from gmapsfx.

johnmc5810 avatar johnmc5810 commented on August 16, 2024

Add this method to MapOptions:
public MapOptions scrollWheel(boolean scrollControl ) {
setProperty( "scrollwheel", scrollControl );
this.scrollControl = scrollControl;
return this;
}
Then in mapInitialized(), can set options
@OverRide
public void mapInitialized() {

    LatLong center = new LatLong(53.3856292, -6.3759797);
    MapOptions options = new MapOptions();
    options.center(center)
            .mapMarker(true)
            .zoom(12)
            .scrollWheel(false)
            .overviewMapControl(false)
            .panControl(false)
            .rotateControl(false)
            .scaleControl(false)
            .streetViewControl(false)
            .zoomControl(true)
            .mapType(MapTypeIdEnum.ROADMAP);

    map = googleMapView.createMap(options, false);

}

from gmapsfx.

GeoffCapper avatar GeoffCapper commented on August 16, 2024

Thanks @johnmc5810 I've just committed a change to MapOptions to add this in. Looking at the docs there are still a few parameters in MapOptions that we haven't included yet.

from gmapsfx.

johnmc5810 avatar johnmc5810 commented on August 16, 2024

No worries, thanks for the library:) if i come across anymore. I'll send them on

from gmapsfx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.