GithubHelp home page GithubHelp logo

Comments (8)

rterp avatar rterp commented on August 16, 2024

Are you still having this issue?

from gmapsfx.

PSchmitzMo avatar PSchmitzMo commented on August 16, 2024

I'm using GMapsFX for nearly one year with full satisfaction . But I am also facing the issue described here. I just upgraded to version 2.0.9, but the problem still persists. I tried to execute an additional (delayed) map refresh after map initialization, without success.

from gmapsfx.

GeoffCapper avatar GeoffCapper commented on August 16, 2024

@PSchmitzMo Are you using the core html file or one in your own jar? In a sample app I created to test images I'm able to load different images using MarkerImageFactory, including one from the local filesystem. It's a different process than specifying the image directly to the WebView/Javascript, but avoids the problems with WebView not being able to reference images in jars unless they're in the same folder as the html file. If you're having trouble could you post a bit of code so we can get an idea of where it might be going wrong? Thanks!

from gmapsfx.

PSchmitzHeuBoe avatar PSchmitzHeuBoe commented on August 16, 2024

Thank you for the analysis of my (quite minor) problem.

My experiences with your proposals:

  1. Images in the same folder as the html file:

The images are displayd. But my problem hasn't vanished: intially all markers display the same icon. After zooming the correct images are displayed.

  1. Loading images with MarkerImageFactory:

a) I use GMapFX 2.0.9
b) I used the MarkerImageFactory implementation committed on Dec. 15 on GitHub.

Icons are not displayed: I specified absolute paths on a drive D: and used the syntax "file:///D://image.png". I verified that "D://image.png" is a valid path.
Execution of createMarkerImageFromFile() does not run into an exception.

Snippet of my code:

        markerOptions.position( new LatLong(x,y) )
                    .visible(Boolean.TRUE)
                    .icon( GMapsFXUtil.createMarkerImage( "file:///D:/myPath/image.png", "png") )
                    .title( title );

(GMapsFXUtil.java is a copy of MarkerImageFactory.java)

My conclusion: My problem is not related to 'image files cannot be found or are wrongly referenced'. I assume that there is some initial mix-up of icons ? But I cannot find it in my code or in MarkerOptions.java.

from gmapsfx.

blekione avatar blekione commented on August 16, 2024

I have the same problem. When Placing different types of markers on the map initially they are messed up (not correct markers are shown for locations). Zooming in or out refreshes the map and solves the problem.

from gmapsfx.

PSchmitzHeuBoe avatar PSchmitzHeuBoe commented on August 16, 2024

Is it possible to execute 'Zooming in or out' programmatically on map initialisation in a way that it is not noticed by the user? I didn't succeed.

from gmapsfx.

 avatar commented on August 16, 2024

One solution is to add markerOptions.animation(Animation.NULL) in order to display the right icons.

from gmapsfx.

PSchmitzHeuBoe avatar PSchmitzHeuBoe commented on August 16, 2024

Hi Mickael,

your advice solved my problem.

Thanks a lot!
Peter

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.