Oke see picture from the simulator
the line goes through the heart of the waypoint. it must be going at the bottom of the icon when anchorV = 1; and anchorU = 0.5
to place a marker i used this code
cnt.addMarker(EncodedImage.create("/maps-pin3.png"), positie , "Marker At","punt", new ActionListener() {
public void actionPerformed(ActionEvent evt) {
Dialog.show("Marker At", "Marker At" , "OK", null);
}
});
for the line i used this code the track gets saved in tracklookup as Coord
private void Trackplot(){
int nr = tracklookup.size();
if (nr > 1) {
Coord [] pad = new Coord[ nr];
for (int i = 0; i < nr; i++) {
pad[i] =tracklookup.get(i);
}
if ( TrackPath != null ) {
cnt.removeMapObject(TrackPath );
}
TrackPath = cnt.addPath( pad);
}
}
Solution 1 would be to add anchorU and anchorV to the addMarkers
Solution 2 use Markeroptions but then i cant change the icon and the coordinates because there is markeroptions.icon of markeroptions.coord
Solution 3 use Addmarker((comp, coord, u, V) but is less smooth than fiirst 1
Solution 4 i can use Maplayout but i have problem to set the container with the markers to transparancey setBGtransparency(0) doensnt work and i cannot change the anchor
Op maandag 11 november 2019 02:51:48 UTC+1 schreef Shai Almog: