[Solved] is there any methord (about google-maps api) to get the mouse’s offset when mouseover (not use jquery) [closed]

I am not sure if I understood your question correctly, but you may want to check out the following example. Both the geographical coordinates as well as the DOM coordinates would update automatically as you move the mouse over the map: <!DOCTYPE html> <html> <head> <meta http-equiv=”content-type” content=”text/html; charset=UTF-8″/> <title>Google Maps mousemove Event Demo</title> <script … Read more

[Solved] Parse JSON objects(lat and lng) in GoogleMap as markers

Please have a look at this line: for(Shop shop : this.response.shops){ map.addMarker(new MarkerOptions().position(new LatLng(shop.getShopLat(), shop.getShopLng())).title(shop.getShopAddress())); } In this line you want to create a new LatLng() object by adding into constructor an array instead of one value, change this line into: for(Shop shop : this.response.shops){ //remember to check is shop.getShopLat() is not null etc.. for(int … Read more

[Solved] How to draw path for given lat long values [closed]

You have to call this method at onCreate. private void getPath(){ float sourceLat = yourSourceLatitude; float sourceLng = yourSourceLongitude; float descLat = yourDescLatitude; float descLng = yourDescLongitude; LatLng origin = new LatLng((int)(sourceLat * 1E6), (int)(sourceLng * 1E6)); LatLng dest = new LatLng((int)(descLat * 1E6), (int)(descLng * 1E6)); // Getting URL to the Google Directions API … Read more

[Solved] Can not show map when use google map api v2?

Create debugging API key and Release API key. Step 1: In Commend Prompt Now locate to jdk in C drive(Considering for windows and assigning C drive) C:\Program Files\Java\jdk1.7.0\bin>keytool -list -v -keystore E:\A.keystore -alias A So it will create SHA-1 finger print. A.keystore is an Keystore, for debugging this file found in C:\Users\User\.android file name is … Read more

[Solved] Calculate the distance between 2 position Google maps Api

My code is get distance of 2 point or 2 location in map with google map deriction service var PolylineOption = { strokeColor : “blue”, strokeOpacity : 0.5, strokeWeight : 5 }; var request = { origin : polyline[0].start, // điểm đầu waypoints : polyline[1].waypoint, destination : polyline[2].end, // Điểm cuối optimizeWaypoints : true, travelMode … Read more

[Solved] Combine Geocode with marker clustering

You are creating a new MarkerCluster every time you create a marker. Create it once, add all the markers to the same MarkerClusterer object. function initMap() { var map = new google.maps.Map(document.getElementById(‘map’), { center: new google.maps.LatLng(43.6191, -113.9772), zoom: 8 }); var infoWindow = new google.maps.InfoWindow; // ******************************************************************************** // ** move the markers array and the … Read more

[Solved] Stacking Map Styles (Google Maps API)

// create a variable for the element you want an option for var styleOptionCityLabels = { featureType: ‘administrative’, elementType: ‘labels’, stylers: [{‘visibility’: ‘on’}] }; // create a variable for your map styles that pulls any option variables you have var mapStyle = [styleOptionCityLabels]; // get the checkbox element you want to control your toggle var … Read more

[Solved] How we can read Google Maps turn by turn Navigation instructions?

Google Maps API Terms of Service have a restriction regarding route guidance. Particularly paragraph 10.4.c (iii) states No navigation. You will not use the Service or Content for or in connection with (a) real-time navigation or route guidance; or (b) automatic or autonomous vehicle control. Additionally, you have to pay attention to other restrictions that … Read more

[Solved] Markers are not showing in google map

your javascript code of google map and marker should be inside window.onload function <script type=”text/javascript”> var locations = <?php echo $locations ?>; window.onload = function(e){ var map = new google.maps.Map(document.getElementById(‘regularMap’), { zoom: 10, center: new google.maps.LatLng(-33.92, 151.25), mapTypeId: google.maps.MapTypeId.ROADMAP }); var infowindow = new google.maps.InfoWindow(); var marker, i; for (i = 0; i < locations.length; … Read more

[Solved] Loop json objects keys to add Google Maps data

The issue with point variable beacause it is an array of point details. You have to add all markers one by one and here I am indicating the exact place where you have the issue. let marker: Marker = this.map.addMarkerSync({ title: ‘Ionic’, icon: ‘blue’, animation: ‘DROP’, position: this.point // issue in here because trying to … Read more

[Solved] Displaying marker with latlong json data in Biostall-google-maps-V3 API Library issue

The problem is google.maps.LatLng is expecting two numbers and you are passing it a string from your database (assuming searchMapDataResult[‘latlong’] is returning a comma delimited string). So you will need to Split the latitude and longitude Convert them into numbers Generate the google.maps.LatLng Like this: var latLngArray = searchMapDataResult[‘latlong’].split(‘,’); var latitude = parseFloat(latLngArray[0]); var longitude … Read more