Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="mainbodydiv">
- <div class="w-container">
- <div class="w-row mainbody">
- <div class="w-col w-col-7">
- <div class="w-embed w-script">
- <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
- <script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
- <script type="text/javascript">
- $(document).ready(function() {
- var bounds = new google.maps.LatLngBounds();
- var options = {
- zoom: 14,
- mapTypeId: google.maps.MapTypeId.ROADMAP
- };
- var googleMap = new google.maps.Map($("#map")[0], options);
- var point = new google.maps.LatLng('-34.500', '-58.90');
- bounds.extend(point);
- var marker = new google.maps.Marker({
- position: point,
- map: googleMap,
- icon: '/Content/images/google-maps-pin_dark_blue_.png',
- });
- googleMap.fitBounds(bounds);
- zoomChangeBoundsListener =
- google.maps.event.addListenerOnce(googleMap, 'bounds_changed', function(event) {
- if (this.getZoom()) {
- this.setZoom(15);
- }
- });
- setTimeout(function() {
- google.maps.event.removeListener(zoomChangeBoundsListener)
- }, 2000);
- });
- </script>
- <div id="map" style="width: 400px; height: 250px;"></div>
- </div>
- </div>
- <div class="w-col w-col-2"></div>
- <div class="w-col w-col-2"></div>
- <div class="w-col w-col-1"></div>
- </div>
- </div>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement