I have a good map on my page. I would like to set the center of it from a function call in javascript? Does the map have an elementID or anything I can reference it in javascript with?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
normally you first create an options obecjt wihich also contains center of the map like
and then you pass it to map object.
After creating a map, you can always manipulate the map options using
mapinstance. I think you don’t need anyElementIDfor setting or getting the center ofmap