Click here to Skip to main content
15,892,298 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
Hi All
I am using google map in my asp.et applicaiton. Here the employe can draw a location on the map and he can save the selected location to the database (latitudes and longitudes for the location). I can draw a rectangle using javascript but can't access the points defined for the rectangle during postback.
The issue is during postbakc the values stored in the hidden variables get cleared. Can anybody suggest me a workaround to solve this issue.
Thanks in advance.
Regards,
samitha
Posted

during postbakc the values stored in the hidden variables get cleared
This would not happen automatically. You have written some code and the way it is written clears the data. Use DEBUGGER, look into it why and when it gets cleared.
It is not a normal behavior where a workaround is needed. Simple code fix should do.
 
Share this answer
 
Comments
Dalek Dave 28-Sep-10 3:34am    
Good Call
I am trying to strore values (latitudes and longitudes) in a hidden field inside the javascript that draws the ploygon as I can't access those points directly in code behind. The valuses get stored in the hidden filed. As soon as I click the save button a postback call is generated and values stored in the hidden field get cleard. This is the problem I am facing. My requirement is to get the values for each of the points in the polygon.
 
Share this answer
 
v2
I recommend you to use [ARTEM GOOGLE MAP CONTROL] for this.. you wouldn't need to use hidden fields and all that.. just drag control on your page and start using it.
 
Share this answer
 
Even though ARTEM GOOGLE MAP CONTROL provies more options I'm still having problems with it. It generates a serialization error when i try to store the location details. Can anybody suggest me any solution for this?
 
Share this answer
 
Which class of Artem are you using to serialize? tell me name
 
Share this answer
 
My simple requirement is to draw a rectangle or circle on the map by marking points on the map and save teh lattitude/longitude details for the rectangle in the database. When I am trying to store the current location details on map click rhe GoogleLocation class generates the serialization error. I feel i am doing somthing wrong here. Can u give me a sample code to help my requirement work.
Thanks in advaance
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900