Related to New processing 3.3.5

edited November 2017 in Raspberry PI

Screenshot_4

can someone let me know why this library is not working with processing 3.3.5 and its working on 3.3.4 ?

Tagged:

Answers

  • Answer ✓

    did you try to install the library again in processing 3.3.5?

  • @chrisir : yes i did , that library we need to intall by yourself is not inbuild like it is in past version and this solve my issue

  • But again Unfolding map and ControlP5 is not working on this version too and Mapthing is not even working with this version.

  • Answer ✓

    Then don't use this version. Use an older, stable version, one which the libraries are compiled against.

  • Answer ✓

    @James_Anderson I recently run controlP5 under Processing3.3.5 and I didn't have any problems. I just tried unfolding maps (circularMap, BasicMap) and they worked as advertised. What OS are you using? It will be great if you can share a small sample code reproducing your problem.

    Kf

  • @kfrajer : my OS is Window 7 and sure i will share my code with you within a while

  • import controlP5.*;
    
    
    import de.fhpotsdam.unfolding.*;
    import de.fhpotsdam.unfolding.core.*;
    import de.fhpotsdam.unfolding.data.*;
    import de.fhpotsdam.unfolding.events.*;
    import de.fhpotsdam.unfolding.geo.*;
    import de.fhpotsdam.unfolding.interactions.*;
    import de.fhpotsdam.unfolding.mapdisplay.*;
    import de.fhpotsdam.unfolding.mapdisplay.shaders.*;
    import de.fhpotsdam.unfolding.marker.*;
    import de.fhpotsdam.unfolding.providers.*;
    import de.fhpotsdam.unfolding.texture.*;
    import de.fhpotsdam.unfolding.tiles.*;
    import de.fhpotsdam.unfolding.ui.*;
    import de.fhpotsdam.unfolding.utils.*;
    import de.fhpotsdam.utils.*;
    import de.fhpotsdam.unfolding.providers.Google;
    
     ControlP5 cp5;
     AbstractMapProvider p1 = new Google.GoogleSimplifiedProvider();
     UnfoldingMap map;
    
    
    void settings() {
    
       size(400, 400, P2D); 
       map = new UnfoldingMap(this, 200, 100, 100, 100, p1 ); //this line positions the map at 0,0 and around 500,500 size-see above image
    
    }
    
    void setup() {
      size(400, 400); 
      cp5 = new ControlP5(this);
    
      // create a new button with name 'buttonA'
      cp5.addButton("Button 1")
         .setValue(0)
         .setPosition(10,10)
         .setSize(50,19)
         ;
    
      // and add another 2 buttons
      cp5.addButton("Button 2")
         .setValue(100)
         .setPosition(80,10)
         .setSize(50,19)
         ;
    
      //map = new UnfoldingMap(this, p1 ); if I try to put this line here I get this error: java.lang.NoSuchFieldError:quailty (unless I removed P2D from size)
      Location melbourneLocation = new Location(-37.815924f, 144.966815f);
      float maxPanningDistance = 0.5; // in km
      map.zoomAndPanTo(15, melbourneLocation);
      map.setPanningRestriction(melbourneLocation, maxPanningDistance);
      map.setZoomRange(14, 18);
      MapUtils.createDefaultEventDispatcher(this, map);
    }
    
    void draw() { 
    
      map.draw();
    
    
    }
    
  • Not able to see button on top of my map, but when i comment map.draw(); then i see those button but now map as i made comment on that.

  • edited August 2017

    @koogs : even i want to use old version but i am working on raspberry pi and in that only version 3 is supportable and not lower than that and yes version 2 work fine and i already made my code on that but library not working on version 3

  • Answer ✓

    i am working on raspberry pi

    important information like this should be in the initial post or the subject line.

  • my OS is Window 7

    i am working on raspberry pi

    ???

  • first i am creating GUI with Win7 as OS and when all test passes afterthat i need to runn that code inside raspberry pi 2 . so that's why i said 2 things above , first win7 and then raspberry pi.

  • Answer ✓

    I believe the problem is caused by calling size twice. Remove the settings() block and modify your setup to look like this:

    void setup() {
      size(400, 400, P2D); 
      map = new UnfoldingMap(this, 25,50, width-50, height-75, p1 );
      ....
    

    The above line provides some padding around the map of 25 pixels and 50 right on top to provide extra space for the controlP5 objects.

    Kf

  • @kfrajer: no problem is not in those lines , problem is on map.draw(); function which we are using ,if you make a comment there , you will see buttons but when you open it , you don't see buttons but you can see map.

    and i already tried the way you telling me and i still have same issue which i told above here .

  • Answer ✓

    I am on Win10 x64 with P3.3.5 and I don't see any issues. This is what I get with my suggested change above:

    Screenshot (9132)

    I can see that if I remove map.draw() in your original code, I will see the buttons. What I found out is that if you have settings() and setup() and multiple calls to size, there is a behavior that I cannot predict. However, if you do it the proper way, you will avoid surprises. Make sure you remove settings() as you don't need it at all in your case.

    Kf

  • edited August 2017

    @kfrajer : that's strange , if i do the way you show me i am getting error on "P2D , P3D , OPENGL" and if i run setup without using any one of them i only see map and no button.

    Updating my Graphic Driver again now and will let you know my result with SS

  • @kfrajer : this is all what i am getting when i try your way and driver updated now.

    Unfolding Map v0.9.6 java.lang.RuntimeException: java.lang.NoSuchFieldError: quality at processing.opengl.PSurfaceJOGL$2.run(PSurfaceJOGL.java:412) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.NoSuchFieldError: quality at de.fhpotsdam.unfolding.mapdisplay.OpenGLMapDisplay.(Unknown Source) at de.fhpotsdam.unfolding.mapdisplay.MapDisplayFactory.getMapDisplay(Unknown Source) at de.fhpotsdam.unfolding.UnfoldingMap.(Unknown Source) at de.fhpotsdam.unfolding.UnfoldingMap.(Unknown Source) at maptestingCP5.setup(maptestingCP5.java:71) at processing.core.PApplet.handleDraw(PApplet.java:2412) at processing.opengl.PSurfaceJOGL$DrawListener.display(PSurfaceJOGL.java:849) at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:692) at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:674) at jogamp.opengl.GLAutoDrawableBase$2.run(GLAutoDrawableBase.java:443) at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1293) at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:1147) at com.jogamp.newt.opengl.GLWindow.display(GLWindow.java:759) at com.jogamp.opengl.util.AWTAnimatorImpl.display(AWTAnimatorImpl.java:81) at com.jogamp.opengl.util.AnimatorBase.display(AnimatorBase.java:452) at com.jogamp.opengl.util.FPSAnimator$MainTask.run(FPSAnimator.java:178) at java.util.TimerThread.mainLoop(Timer.java:555) at java.util.TimerThread.run(Timer.java:505) Could not run the sketch (Target VM failed to initialize). For more information, read revisions.txt and Help ? Troubleshooting. Screenshot_3

  • @kfrajer :And if i don't use P2D , P3D and OPENGL , code is running but its running like this :Screenshot_4

  • Unfolding Map v0.9.6

    I have version 0.9.8beta. Did you install your through the Library manager in the Processing IDE?

    Kf

  • edited August 2017

    @kfrajer : i downloaded it from unfolding map official website and haven't seen that beta version there so can you please email me that file to this email ID : dragtohell@rediffmail.com .And thank you for talking all your time on helping me out with this.

  • Answer ✓

    I will tag @tnagel as he can give you the latest version. The link he gave me is not valid anymore. I will e-mail you the jar files in a sec.

    Kf

  • @kfrajer : Thank you and yes i even email @tnagel too

  • @kfrajer : Thank you so much for all your time and finally issue solved and now its easy for me to go further and yes those file work for me , i just replaced old file with new one and its done. Screenshot_3

  • Answer ✓

    Great, good to hear. Good luck!

    Kf

  • @kfrajer : Thank you Again for all your time which you put here and Good Luck to you too.

  • @kfrajer @James_Anderson

    Hi, i think I'm having the same issue here. I downloaded the Unfolding Maps library from their website and it doesen't work on processing 3.3 and bugs when running on Processing 2.2

    For my project, I need to work with Procesing 3.3. Can you send me the working version of unfolding library?

    Thanks!!

  • Yes, I am tagging @tnagel as he can give you a link to a version that works with P3 or send me a PM with your e-mail and I can send you the jars in the evening.

    Kf

  • Hello everybody!

    First, thanx for this awesome Library, @tnagel..!!

    I'm having the same issues as posted above, and needing to import a P3 compatible version. Would you be so kind to share the above link with me, @kfrajer..!?

    The library will be used for a dataViz Project for SmartCity and OpenData BuenosAires..!!

    Thanx in advance for your time and support..!!

  • @PleekMan

    Send me a PM with your e-mail and I send you the jars that I have. Note there is a new release out there. nevertheless, the version I have v0.98 works with P3.3.6

    Kf

Sign In or Register to comment.