got it to work :-)

changed back to double quotes around the image path, I guess using
single quotes must have caused a problem with the WordPress shortcode
function?

thank you for the help

Will

On Jul 16, 12:44 pm, Pigeon <[email protected]> wrote:
> Thank you, I think I fixed it but I am now getting a new error:
>
> Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /
> home/purplepenguin/cranihum.com/wp-content/themes/kava/functions.php
> on line 67
>
> this is line 67 </div>';
>
> here's my code snippet from functions.php:
>
> <?php
> function wpmap() {
>     return '<script type="text/javascript" src="http://maps.google.com/
> maps/api/js?sensor=false"></script>
> <script type="text/javascript">
>   function initialize() {
>     var latlng = new google.maps.LatLng(51.51440469156112,
> -0.1354837417602539);
>     var myOptions = {
>       zoom: 16,
>       center: latlng,
>       navigationControl: true,
>       navigationControlOptions: {style:
> google.maps.NavigationControlStyle.DEFAULT},
>       mapTypeId: google.maps.MapTypeId.ROADMAP,
>       streetViewControl: true
>     };
>     var map = new
> google.maps.Map(document.getElementById("map_canvas"), myOptions);
>
>   var image = '/wp-content/themes/kava/images/pp_logo.png';
>   var myLatLng = new google.maps.LatLng(51.51440469156112,
> -0.1354837417602539);
>   var marker = new google.maps.Marker({
>       position: myLatLng,
>       map: map,
>       title:"Pink Pigeon",
>       icon: image
>   });
>   }
> window.onload = initialize;
> </script>
> <div id="mapsize">
> <div id="map_canvas" style="width:100%; height:100%">
> </div>
> </div>';}
>
> add_shortcode('map', 'wpmap');
> ?>
>
> I must have missed something...
>
> Thanks
>
> Will
>
> On Jul 16, 9:13 am, Pil <[email protected]> wrote:
>
> > The image doesn't exist within your defined path.
>
> > Caution! Calling this address crashed my browser
>
> >http://www.pinkpigeon.net/contact/pp_logo.png
>
> > Instead the image seems to be here
>
> >http://www.pinkpigeon.net/pp_logo.png
>
> > On Jul 16, 9:32 am, Pigeon <[email protected]> wrote:
>
> > > For some reason I'm getting an unexpected T_STRING when using single
> > > quote in var image ='image'; so I changed it to double quote but now I
> > > don't get a marker...
>
> > > var image = "pp_logo.png";
> > >   var myLatLng = new google.maps.LatLng(51.51440469156112,
> > > -0.1354837417602539);
> > >   var marker = new google.maps.Marker({
> > >       position: myLatLng,
> > >       map: map,
> > >       title:"Pink Pigeon",
> > >       icon: image
>
> > > What am I doing wrong?
>
> > >http://www.pinkpigeon.net/contact/
>
> > > Thank you
>
> > > Will

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

Reply via email to