Rossco, Thanks for your quick answer. Looks like that is the main problem why my script doesn't work. I mean an empty array. Here is the explanation why I tried this: In general any grid is a set of vertical and horizontal lines. On each zoom level there can be different number of them (since I'd like to use different intervals between each 2 grid lines) and we can not know how much. So that is why I tried to pass an empty array and them use it in my 'draw' function. And as I can understand now, I have to move a part of my code to 'onAdd' from 'draw' where I will define how much grid lines I need for current zoom level and their properties and put them to that empty array. Only after that I can use "this.getPanes().overlayLayer.appendChild(this.divs_);" And in my 'draw' I just need to get this array and call some drawing funcs. Right?
As for about example I tried to use, here is a link that was posted by Bill Chadwick in another group: http://www.bdcc.co.uk/LatLonGraticule.js But as I said before it is for v2 of Google Maps API. He also tried to use an empty array and that works for him. --- Thanks in advance, Alexey On 17 фев, 00:35, Rossko <[email protected]> wrote: > > found one pretty example from Bill Chadwick for v2 and tried to > > redesign it to use v3, but it doesn't work by some reason. > > If you shared a link to that, people may be able to help you with it > > > this.divs_ = new Array(); > > this.divs_ is an (empty) javascript array, there are no DIVs of any > kind involved here. > > > this.getPanes().overlayLayer.appendChild(this.divs_); > > You attempt to append an empty javascript array to the DOM. You > cannot insert javascript variables into the DOM, you must insert HTML > elements of some kind. -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.
