codenameone / codenameone-google-maps

Allows native google maps to run within Codename One applications
https://www.codenameone.com/
13 stars 24 forks source link

addMarker method not returning MapObject #10

Closed DurankGts closed 7 years ago

DurankGts commented 7 years ago

Hi,

addMarket method It just return MapObject the first time but When use removeMapObject metthod and I use addMarker method it return null value.

                                if (moAgent != null) {
                                    mc.removeMapObject(moAgent);

                                }
                                moAgent = mc.addMarker(i, c, agentName, agentName, new ActionListener() {
                                    public void actionPerformed(ActionEvent evt) {
                                        Log.i(TAG, methodName + "()->agentName click:" + agentName);
                                    }
                                });
shannah commented 7 years ago

Can't reproduce. Please provide full test case.

DurankGts commented 7 years ago

Could you tell how can I create this full test case?

shannah commented 7 years ago

Create a minimal demo app that exhibits the behaviour and post the main class of this app (i.e. the one with start(), stop(), etc... ) as a github gist.

I should be able to create a new project on my end, paste your class in, and reproduce the problem.

DurankGts commented 7 years ago

if I have two marker point added in my map, how can I update any of this marker with out delete the other marker point?

DurankGts commented 7 years ago

how can I update now this cn1 lib with this new fix that you applied?

shannah commented 7 years ago

It will be available shortly in the Codename One extensions (in codename one settings). Just check there and it the button says "Update", then the update is there.

shannah commented 7 years ago

https://github.com/codenameone/codenameone-google-maps/blob/master/GoogleMapsTest/src/com/codename1/test/googlemaps/GoogleMapsTestApp.java#L108-L117