Hi,

I have a issue like the subject. The sample code is as following.
The issue is when you input some characters into the input field, you
cold not back to the character by  using your mouse. I mean if your
input 'abcd' into the field, you could not move your cursor between
'a' and 'b' by using mouse.
Dose anyone know a good solution about it?

Any advice thanks.

- ono

--sample code--

<html>
        <head>
                <meta http-equiv="content-type" content="text/html; 
charset=UTF-8" /
>
                <title>Google Maps API version3 Example: Overlay1</title>
                <script type="text/javascript" 
src="http://maps.google.com/maps/api/
js?sensor=false"></script>
                <script type="text/javascript">
                        var map = null;
                        function initialize() {
                                var myLatlng = new 
google.maps.LatLng(35.472324, 133.05052);
                                var myOptions = {
                                        zoom : 10,
                                        center : myLatlng,
                                        mapTypeId : 
google.maps.MapTypeId.ROADMAP
                                };
                                map = new 
google.maps.Map(document.getElementById("map_canvas"),
                                                myOptions);
                                AddOverlayData();
                        }

                        function AddOverlayData() {
                                var northEast = map.getCenter();
                                northEast = new 
google.maps.LatLng(northEast.lat() + 0.5,
northEast
                                                .lng() + 1);
                                var southWest = new 
google.maps.LatLng(northEast.lat() - 1,
northEast
                                                .lng() - 2);
                                map.fitBounds(new 
google.maps.LatLngBounds(southWest, northEast));
                                var lngSpan = northEast.lng() - southWest.lng();
                                var latSpan = northEast.lat() - southWest.lat();
                //              for ( var i = 0; i < 10; i++) {
                                for ( var i = 0; i < 1; i++) {
                                        new AddOverlay(i, southWest.lat() + 
latSpan * Math.random(),
                                                        southWest.lng() + 
lngSpan * Math.random());
                                }
                        }

                        function AddOverlay(id, lat, lng) {
                                this.id_ = id;
                                this.lat_ = MathRound(lat);
                                this.lng_ = MathRound(lng);
                                this.setMap(map);
                        }

                        AddOverlay.prototype = new google.maps.OverlayView();
                        AddOverlay.prototype.draw = function() {
                                if (!this.div_) {
                                        this.div_ = 
document.createElement("div");
                                }
                                var div = this.div_;
                                var panes = this.getPanes();
                                panes.overlayLayer.appendChild(div);
                                var latlng = new google.maps.LatLng(this.lat_, 
this.lng_);
                                var point = 
this.getProjection().fromLatLngToDivPixel(latlng);
                                div.title = "Point" + this.id_;
                                div.style.position = "absolute";
                                div.style.left = point.x + "px";
                                div.style.top = point.y + "px";
                                div.style.fontSize = "10px";
                                div.style.width = "200px";
                                div.style.height = "30px";
                                div.style.lineHeight = "1em";
                                div.style.border = "1px solid #666";
                                div.style.background = "#fffffe";

                                div.innerHTML = '<form><input type="text" 
value="" width="100"
name="aaa" onclick="this.focus();"></form>';
 
panes.overlayMouseTarget.appendChild(div);
                        };
                        function MathRound(id) {
                                var s = 10000;
                                return Math.round(id * s) / s;
                        }
                        function addEvent(obj, evType, fn) {
                                if (obj.addEventListener) {
                                        obj.addEventListener(evType, fn, false);
                                } else if (obj.attachEvent) {
                                        obj.attachEvent("on" + evType, fn);
                                }
                        }
                        addEvent(window, "load", initialize);
                </script>
        </head>
        <body>
                <h1>Google Maps API v3 Example: Overlay1</h1>
                <div id="map_canvas" style="width: 600px; height: 350px;"></div>
        </body>
</html>

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

Reply via email to