sorry, my bad. here it is:
http://utopic.nfshost.com/newmapcanvas.html


On Jan 1, 7:59 pm, Marcelo <[email protected]> wrote:
> On Jan 1, 5:09 pm, Dan <[email protected]> wrote:
>
> > Hi, after the page has allready loaded I'm trying to get another javascript
> > function to add a marker on the loaded map. The below is a short version of
> > what I'm trying to do based on the API examples, but it does not add the
> > marker... what am I missing? Any ideas?
>
> You're missing a link to a page that demonstrates the problem.
>
> --
> Marcelo -http://maps.forum.nu
> --
>
>
>
>
>
> > thanks in advance
>
> > <!DOCTYPE html>
> > <html>
> > <head>
> > <title>Google Maps JavaScript API v3 Example: Marker Simple</title>
>
> > <link
> > href="http://code.google.com/apis/maps/documentation/javascript/examples/de...";
> > rel="stylesheet" type="text/css" />
> > <script type="text/javascript"
> > src="//maps.googleapis.com/maps/api/js?sensor=false"></script>
> > <script type="text/javascript">
>
> >     function callafunction(){
>
> >      var latlng = new google.maps.LatLng(-25.363882,131.044922);
> >     marker = new google.maps.Marker({
> >       position: latlng,
> >       map: map
> >     });
>
> >     }
>
> >   function initialize() {
> >     var myLatlng = new google.maps.LatLng(-25.363882,131.044922);
> >     var myOptions = {
> >       zoom: 4,
> >       center: myLatlng,
> >       mapTypeId: google.maps.MapTypeId.ROADMAP
> >     }
> >     var map = new google.maps.Map(document.getElementById("map_canvas"),
> > myOptions);
>
> >   }
> > </script>
> > </head>
> > <body onload="initialize()">
> >         <form id="callafunction" action="#" onSubmit="return false;">
> >                     <input type="submit" value="callafunction"
> > onClick="callafunction(); return false;"/>
> >         </form>
> >   <div id="map_canvas"></div>
> > </body>
> > </html>- Hide quoted text -
>
> - Show quoted text -

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