Problem display Pegman into map inside StreetView

270 views
Skip to first unread message

Gigi

unread,
Mar 22, 2011, 2:46:43 PM3/22/11
to Google Maps JavaScript API v3
Hi,
for my application I use a code similar to this written by Mark Ridey
in his blog http://blog.mridey.com/2010/11/how-to-display-map-inside-streetview.html
If I use
<script src="http://maps.google.com/maps/api/js?sensor=false"
type="text/javascript"></script>
the Pegman not dispaly into Map

But If i set the version
<script src="http://maps.google.com/maps/api/js?v=3.3&sensor=false"
type="text/javascript"></script>
It's function.
This is a map api issue?

Thanks
Gigi
Message has been deleted
Message has been deleted

Luke Mahé

unread,
Mar 23, 2011, 11:44:55 PM3/23/11
to google-map...@googlegroups.com, qbit
It is not there because you are using OSM as your map type. When you switch to RoadMap or Satellite the pegman shows.

-- Luke

On Thu, Mar 24, 2011 at 2:40 PM, qbit <odb...@gmail.com> wrote:
Can anyone help with this?

On Mar 23, 5:50 pm, qbit <odb...@gmail.com> wrote:
> The pegman has gone missing missing from my map as well athttp://www.weuni.com
> as of the latest nightly merge.

>
> On Mar 23, 5:46 am, Gigi <cybt...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Hi,
> > for my application I use a code similar to this written by Mark Ridey

> > If I use
> > <script src="http://maps.google.com/maps/api/js?sensor=false"
> > type="text/javascript"></script>
> > the Pegman not dispaly into Map
>
> > But If i set the version
> > <script src="http://maps.google.com/maps/api/js?v=3.3&sensor=false"
> > type="text/javascript"></script>
> > It's function.
> > This is a map api issue?
>
> > Thanks
> > Gigi

--
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.


Luke Mahé

unread,
Mar 23, 2011, 11:50:27 PM3/23/11
to google-map...@googlegroups.com, qbit
This was fixed in the latest release.

-- Luke

On Thu, Mar 24, 2011 at 2:46 PM, qbit <odb...@gmail.com> wrote:
Fair enough. Although it previously worked without choosing the google
map layer??

qbit

unread,
Mar 23, 2011, 11:51:48 PM3/23/11
to Google Maps JavaScript API v3
No sweat, thnx

qbit

unread,
Mar 23, 2011, 11:46:42 PM3/23/11
to Google Maps JavaScript API v3
Fair enough. Although it previously worked without choosing the google
map layer??

On Mar 24, 2:44 pm, Luke Mahé <lu...@google.com> wrote:

Gigi

unread,
Mar 24, 2011, 5:42:41 AM3/24/11
to Google Maps JavaScript API v3
Hi Luke,
sorry but I have implemented this code

function initialize() {
var panorama = new
google.maps.StreetViewPanorama(document.getElementById("pano"), {
position: new google.maps.LatLng(42.345573,-71.098326),
visible: true
});
var map = new
google.maps.Map(document.getElementById("map_canvas"), {
center: new google.maps.LatLng(42.345573,-71.098326),
zoom: 14,
mapTypeId: google.maps.MapTypeId.ROADMAP,
mapTypeControl: false,
streetViewControl: false,
zoomControl: false,
streetView: panorama
});

google.maps.event.addListener(panorama, "position_changed",
function() {
map.setCenter(panorama.getPosition());
});
}

and the mapTypeId is ROADMAP but if i use http://maps.google.com/maps/api/js?sensor=false
i don't display a pegman into map.
Can you help me?

Thanks
Gigi

qbit

unread,
Mar 25, 2011, 5:25:07 AM3/25/11
to Google Maps JavaScript API v3
Hey Luke,
Is there a way to force this behaviour? i.e Force Pegman showing in
custom map types?

Nianwei Liu

unread,
Mar 25, 2011, 9:55:32 AM3/25/11
to Google Maps JavaScript API v3
There is an issue filed here:
http://code.google.com/p/gmaps-api-issues/issues/detail?id=3189

Please star this issue.

Nianwei Liu

unread,
Mar 25, 2011, 10:15:00 AM3/25/11
to Google Maps JavaScript API v3
After some reading I believe this is a bug introduced by fixing issue
3154 http://code.google.com/p/gmaps-api-issues/issues/detail?id=3154.
Although the default UI probably should not show the streetviewContorl
when displaying moon as in here:
http://code.google.com/intl/es-ES/apis/maps/documentation/javascript/examples/maptype-image.html,
there are plenty of customized map types that happen to be in web
mercator projection on earth and lines up with streetview layer
perfectly and would love to have street view available.
So I think a comprise to solve both issue 3154 and this new issue of
3189 http://code.google.com/p/gmaps-api-issues/issues/detail?id=3189
is to allow developers force streetviewControl in mapOptions. Some
tweaks in defaultUI logic is necessary but doable because javascript
treat undefined, null and false differently.

Reply all
Reply to author
Forward
0 new messages