Strange, setting EuclideanProjection(4) breaks all icons and overlays.
Here's what I'm currently doing, which at least renders the map:
tilelayers = [new GTileLayer(copyCollection, 0, 4)];
custom_map = new GMapType(
tilelayers,
new EuclideanProjection(18),
'Custom map',
{errorMessage: 'Missing image'}
);
On Nov 16, 8:40 pm, ebakunin <[email protected]> wrote:
> Reading through the posts now. But no, my map only zooms to level 4.
>
> On Nov 16, 8:03 pm, "[email protected]" <[email protected]>
> wrote:
>
> > On Nov 16, 6:56 pm, ebakunin <[email protected]> wrote:
>
> > > I am instantiating a GMap2 object, but I'm implementing a
> > > EuclideanProjection. Would that be the reason why getWrapWidth() is
> > > not working with polys? Thanks.
>
> > Have you looked through
> > these?http://groups.google.com/group/google-maps-api/search?hl=en&group=goo...
>
> > (does your custom projection have a zoom level 17?)
> > -- Larry
>
> > > On Nov 16, 12:56 am, Marcelo <[email protected]> wrote:
>
> > > > On Nov 16, 1:13 am, ebakunin <[email protected]> wrote:
>
> > > > > I love this place. Ask and ye shall receive!
>
> > > > > That works wonders, but what about polylines and polygons? Thanks.
>
> > > > Change the API version to 2.s and it works for polys as well.
>
> > > > --
> > > > Marcelo -http://maps.forum.nu
> > > > --
>
> > > > > On Nov 15, 4:19 pm, Marcelo <[email protected]> wrote:
>
> > > > > > On Nov 15, 8:08 pm, ebakunin <[email protected]> wrote:
>
> > > > > > > That worked great! Is it also possible to restrict icons and
> > > > > > > polylines
> > > > > > > to the same area as well?
>
> > > > > > Didn't I mention that everything is possible? :-)
>
> > > > > > Quick and dirty version:
> > > > > > Look at the difference between GProjection.getWrapWidth() and
> > > > > > GMercatorProjection.getWrapWidth();
>
> > > > > > It doesn't work with infinity, but if you return a sufficiently
> > > > > > large
> > > > > > number then the placement of overlays is done on one Earth only.
> > > > > > There is however a strange unwanted effect on the first loading of
> > > > > > the
> > > > > > map, which is that it displays the "no tiles at this level" message
> > > > > > to
> > > > > > the right and below the map, but it disappears after you zoom in and
> > > > > > out.
>
> > > > > > Try something like this:
>
> > > > > > GMercatorProjection.prototype.getWrapWidth = function(zoom) {
> > > > > > return 999999999999999999999999;
>
> > > > > > }
>
> > > > > > --
> > > > > > Marcelo -http://maps.forum.nu
> > > > > > --
>
> > > > > > > And while I'm asking for everything, is it possible to change the
> > > > > > > background color of the canvas itself?
>
> > > > > > > Thanks a lot for the help.
>
> > > > > > > On Nov 15, 2:59 am, Marcelo <[email protected]> wrote:
>
> > > > > > > > Everything is possible!http://maps.forum.nu/gm_no_wrap.html
>
> > > > > > > > --
> > > > > > > > Marcelo -http://maps.forum.nu
> > > > > > > > --
>
> > > > > > > > On Nov 15, 4:50 am, ebakunin <[email protected]> wrote:
>
> > > > > > > > > I would like to prevent a map from screen wrapping. In other
> > > > > > > > > words,
> > > > > > > > > tiles will not repeat and moving far west or east will
> > > > > > > > > display the
> > > > > > > > > background gray canvas instead of a tile. Is this possible?
> > > > > > > > > Thanks.
--
You received this message because you are subscribed to the Google Groups
"Google Maps API" 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-api?hl=.