Hello everybody,
the accuracy of my icons' positions strongly depends on the zoom level. For example, an icon in the middle of Tokyo (displayed perfectly when I am "close" to it) appears in China when I set the zoom level to 1 :-)
At first I thought the icon (a .png file) was inadequate but I have the same problem no matter which icon I use.
Are there any suggestions or do I have to live with this inaccuracy?
Thanks in advance, happy to be back to this forum! (still jira, the last time that I posted)
Congratulations for the great work,
Apostolos
Indeed, it had to do with the PlaceIcon contructor. I had already used the overloaded one, as you proposed, but with wrong numerical values for the 2nd and 3d argument.
Your comment pointed to the problem anyway, thanks a lot!
I think the issue is that default icon anchor location is in the center of image. If you use "google-style" markers then it visually seems to be in the bottom-center, and you should define tit there too. To set marker to own defined location (bottom-center) use non-default PlaceIcon, something like following:
try { iconImage = Image.createImage("/mymarker.png"); } catch (IOException e) {} PlaceIcon placeIcon = new PlaceIcon(iconImage, iconImage.getWidth() / 2, iconImage.getHeight()); Place place = new Place(3, "My Place", placeMark, new WgsPoint(24.76593650384734, 59.44530921763007)); mapComponent.addPlace(place);/JaakL