Search the Community
Showing results for tags 'google map'.
-
Hi All, I want to insert a Google static map. I noticed that there may be some loss of information (e.g., loss of the name of narrow streets) when using lower value for the size attribute of the map. For example, http://maps.googleapis.com/maps/api/staticmap?&size=600x600 may show more details than http://maps.googleapis.com/maps/api/staticmap?&size=150x150. On the other hand I want the static map to display on smartphones, adjusted to their width. With some JS I could get the width of the smartphone and inject it in the size attribute, but that could lead to some loss of details. So here is my question : is it possible to load the map, say, at 600x600, then shrink it to the width of the smartphone (in the same way as shrinking a jpg image where details are not lost, but just rescaled) ? Thanks !
-
Hi all The issue is, I want to show a map on google map site with marker on the location, when someone click on the link on my site. The problem is map is showing correctly, but no marker is there. Here is the link I am using <a href="https://www.google.com.au/maps/dir/-31.944951,115.803171">Map</a> Any help ?
-
hi guys, im new with google map, i need some help. i have ajax call, here: $('#checkbtn').click(function(e) { e.preventDefault(); var lo=$("#long").val(); var la=$('#lat').val(); $.ajax({ url:BASEURL+'register/checklocation', type:'POST', data:{log:lo,lat:la}, success:function(data) { $('#view_checkmap').html(data); } }); }); here is my view to view the map: <script> function initialize() { var myLatlng = new google.maps.LatLng(<?php echo $lat; ?>,<?php echo $long; ?>); var mapOptions = { zoom: 15, center: myLatlng, mapTypeId: google.maps.MapTypeId.ROADMAP } var map = new google.maps.Map(document.getElementById('mymap'), mapOptions); var marker = new google.maps.Marker({ position: myLatlng, map: map, title: 'my location' }); } google.maps.event.addDomListener(window, 'load', initialize); </script> <div id="mymap" style="width:500px; height:300px;"></div> when i access to the URL, it displays, but when i access over ajax, nothing display. is my code worng or something else? thanks in advance.
-
- google map
- ajax
-
(and 1 more)
Tagged with: