Win a copy of Classic Computer Science Problems in Swift this week in the iOS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

The new marker of the new request is not being added to the google map.  RSS feed

Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have a checkboxlist where the user can select some routes then a reponse is being getting from the server. I have method gotoLocation to upadte the location of the markers as well to add a new marker in the map when a new one is being inserted into the table on the serverside with the same route.

I am using HashMap with the table id as a key and the marker as value also in my case the key is unique.

The Updating part works fine but I am facing problem with the adding part. So after the user selectes the desired routes, they are being added to the map as marker and to the HashMap as elements but the problem occures when I insert a new one with the same route and different key (id is being incremented by one in the table) into the table then the adding part is being entered and the id of the new added one is being recognized but the new marker is not being added on the map but to the HashMap markerMap.

Additionally when the new Response reaches the method again I noticed that the last added marker with the new id is not in the HashMap and it just contains the elements of the first request also when the request is over and the new added element stays in the HashMap for the request Life! is there any explanation for this behaviour and how can I fix it?

I appreciate any help.

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!