You're using undocumented internal properties that may change arbitrarily whenever Google recompiles the Maps API code. You need to use the documented Maps API methods instead.
In your containsLatLng() function, the position variable and each cityPoints[i].center property are google.maps.LatLng objects. You need to use position.lat() and position.lng() to retrieve the latitude and longitude instead of the undocumented position.K and position.G properties. Based on the commented-out code, it looks like you've already had to change this once or twice to keep up with new versions of the Maps API. If you think about it, does it make sense that Google would name the latitude K and the longitude G, or other arbitrary letters, and expect you to update your code when those names change? Of course not. :-) Don't use Maps API properties that you discover in the JavaScript console. Use only the documented methods for any Maps API object and these problems will go away. You should also search your code for any other similar use of undocumented properties and change them to use the documented methods. On Thu, Feb 18, 2016 at 6:34 AM, 'Neetu Patel' via Google Maps JavaScript API v3 <google-maps-js-api-v3@googlegroups.com> wrote: > HI Michael, > Here is the information you requested. > > > //containsLatLng function > > > var containsLatLng = function (cityPoints, position) { > var i = cityPoints.length; > while (i--) { > > // if (cityPoints[i].center.A == position.A && > cityPoints[i].center.G == position.G) { > if (cityPoints[i].center.K == position.K && > cityPoints[i].center.G == position.G) { > return i; > } > // else if( cityPoints[i].center.H == position.H && > cityPoints[i].center.L == position.L ) > // { > // return i; > // > } > return -1; > }; > > > > > > //Data in msg variable.(See the attached file) > > //JS file whole (See the Attached file) > > its an intranet site , so can't post the link.(Attached please see the > screenshot) > > > > > > > > > >> -- > You received this message because you are subscribed to the Google Groups > "Google Maps JavaScript API v3" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to google-maps-js-api-v3+unsubscr...@googlegroups.com. > To post to this group, send email to > google-maps-js-api-v3@googlegroups.com. > Visit this group at https://groups.google.com/group/google-maps-js-api-v3. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-maps-js-api-v3+unsubscr...@googlegroups.com. To post to this group, send email to google-maps-js-api-v3@googlegroups.com. Visit this group at https://groups.google.com/group/google-maps-js-api-v3. For more options, visit https://groups.google.com/d/optout.