i also tried the maplayout with a markers containers also here the anchor 
is wrong  it is in the top left corner (o,0)

the code i use is 

  MapContainer cnt1 = new MapContainer();

  Kaartdispl = new Form("Maps", new LayeredLayout());
       
        if(BrowserComponent.isNativeBrowserSupported()) {
         Kaartdispl.add(cnt1);

            markers.getAllStyles().setBgTransparency(0, true);
            markers.setLayout(new MapLayout(cnt1, markers));
            Kaartdispl.add(markers);

        } else {
            // iOS Screenshot process...
            Kaartdispl.add(new Label("Loading, please wait...."));
        }


      FButton = new ScaleImageButton ();
      FButton.setName("HP");
      String Lats = latlon(String.valueOf(position.getLatitude()));
                   String Lons = 
latlon(String.valueOf(position.getLongitude()));
                   String Weergave = "Positie ( " + String.valueOf(Lats)  + 
", " + String.valueOf(Lons) + "} "; // + ")";_ 
    
                  Component C = findByName(markers, "HP");
                  
                       if (  C != null   ) {
                   //cnt.rremoveMapObject(FButton );
                markers.removeComponent(C );
                           }
                       
FButton.setIcon(EncodedImage.create("/maps-pin3.png"));
FButton.setBackgroundType(Style.BACKGROUND_IMAGE_SCALED_FILL);

FButton.addActionListener((e) ->fillclick(Weergave));
  markers.add(position, FButton);

>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/328d559c-122d-4c85-a818-ac431c37865f%40googlegroups.com.

Reply via email to