Hide markers when Street view is on

824 views
Skip to first unread message

Jean-Baptiste Matthews

unread,
Jun 17, 2010, 9:58:51 AM6/17/10
to Google Maps JavaScript API v3
Hi
I would like to hide the markers when the map switches to the Street
View mode but I don't know the best way to proceed.
Here is the map :
http://www.parisdigest.com/transfert/map_paris/map_of_paris_monuments.htm

As you can see, markers always are in the field of view and it's quite
uncomfortable...

Thanks a lot for your help.

Nathan Raley

unread,
Jun 17, 2010, 12:02:43 PM6/17/10
to google-map...@googlegroups.com
If you create a custom pano then the markers on the regular map should not show up on the panorama unless you make a duplicate copy of the markers and set their "map" property to that of the pano.

So simply create a custom panorama, there are references and examples of how to do this in Google's documentation, and then keep everything else the same and you should be good to go. 


--
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 google-map...@googlegroups.com.
To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.


MdK

unread,
Jun 23, 2010, 5:35:44 AM6/23/10
to Google Maps JavaScript API v3


On 17 jun, 18:02, Nathan Raley <nlrale...@gmail.com> wrote:
> If you create a custom pano then the markers on the regular map should not
> show up on the panorama unless you make a duplicate copy of the markers and
> set their "map" property to that of the pano.
>
> So simply create a custom panorama, there are references and examples of how
> to do this in Google's documentation, and then keep everything else the same
> and you should be good to go.
>
> On Thu, Jun 17, 2010 at 8:58 AM, Jean-Baptiste Matthews <
>
>
>
> jeanbaptiste.matth...@gmail.com> wrote:
> > Hi
> > I would like to hide the markers when the map switches to the Street
> > View mode but I don't know the best way to proceed.
> > Here is the map :
> >http://www.parisdigest.com/transfert/map_paris/map_of_paris_monuments...
>
> > As you can see, markers always are in the field of view and it's quite
> > uncomfortable...
>
> > Thanks a lot for your help.
>
> > --
> > 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
> > google-map...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-maps-js-a...@googlegroups.com<google-maps-js-api-v3%2B­unsub...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-maps-js-api-v3?hl=en.- Tekst uit oorspronkelijk bericht niet weergeven -
>
> - Tekst uit oorspronkelijk bericht weergeven -

MdK

unread,
Jun 23, 2010, 5:30:15 AM6/23/10
to Google Maps JavaScript API v3
I'm experiencing the same problem right now:
I have a map with some markers, and have set the map's
streetviewcontrol to true. When I drag the pegman to a street on the
map streetview is displayed, but with the markers i have set on the
map. I don't want those markers to show on the streetview.

Nahtan said to create a custom panorama, but I can't figure out how to
show a custom panaroma in the same div as the map, which displays the
streetview at the position the pegman is displayed to.

Thanks in advance!

On 17 jun, 18:02, Nathan Raley <nlrale...@gmail.com> wrote:
> If you create a custom pano then the markers on the regular map should not
> show up on the panorama unless you make a duplicate copy of the markers and
> set their "map" property to that of the pano.
>
> So simply create a custom panorama, there are references and examples of how
> to do this in Google's documentation, and then keep everything else the same
> and you should be good to go.
>
> On Thu, Jun 17, 2010 at 8:58 AM, Jean-Baptiste Matthews <
>
>
>
> jeanbaptiste.matth...@gmail.com> wrote:
> > Hi
> > I would like to hide the markers when the map switches to the Street
> > View mode but I don't know the best way to proceed.
> > Here is the map :
> >http://www.parisdigest.com/transfert/map_paris/map_of_paris_monuments...
>
> > As you can see, markers always are in the field of view and it's quite
> > uncomfortable...
>
> > Thanks a lot for your help.
>
> > --
> > 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
> > google-map...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-maps-js-a...@googlegroups.com<google-maps-js-api-v3%2B­unsub...@googlegroups.com>
> > .
> > For more options, visit this group at

Nathan Raley

unread,
Jun 23, 2010, 9:07:12 AM6/23/10
to google-map...@googlegroups.com
With some css coding you should be able to hide your map div and show the streetview div, or you could set the streetview div as a child of the parent map div and toggle its view state.

That would be the two directions I would investigate.  I offered some people some advice with regards to hiding and showing divs a couple of different times throughout the past week, if you have problems finding them I can link you the examples again.

To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com.

Nathan Raley

unread,
Jun 23, 2010, 9:08:19 AM6/23/10
to google-map...@googlegroups.com
But as a note to that, it would be much simpler to just hide the map div and show the street div instead and toggle back and forth, but you'll have to probably add a listener to the close control on the street view to reshow the map div.
Reply all
Reply to author
Forward
0 new messages