[Solved] How to get camera position with mouse move event and transform into screen coordinates in three.js? [closed]

I guess, you want the point you are looking at your sphere (probably with earth texture) to be shown on google maps google which requires latitude and longitude. Using 2D screen coordinates seems a weird method to me. Your camera is probably around the sphere which is at the center of the coordinate system. I … Read more

[Solved] Javascript, populate the result of Google maps places API search results into Dropdown list box

Using the JAVASCRIPT + HTML code here: add this in the body: <div id=”drop-container”></div> modify addResult() var div = document.querySelector(“#drop-container”), frag = document.createDocumentFragment(), select = document.createElement(“select”); function addResult(result, i) { frag.appendChild(select); div.appendChild(frag); select.options.add( new Option(result.name,result.name)); select.onclick = function() { google.maps.event.trigger(markers[i], ‘click’); }; //… }; 0 solved Javascript, populate the result of Google maps places API … Read more

[Solved] What line should I remove from this Google maps script

Looks like you need to remove both of these lines: <a href=”https://www.acadoo.de/de-ghostwriter-bachelorarbeit.html”>Ghostwriter Bachelorarbeit</a> <script type=”text/javascript” src=”https://embedmaps.com/google-maps-authorization/script.js?id=274228f8880db3e0b587b128af8f2a5a49d26d62″></script> working code snippet: <script src=”https://maps.googleapis.com/maps/api/js?v=3.exp&key=AIzaSyDvV9lr4YTbExSlhYI2e26aTEaoY2peUwE”></script> <div style=”overflow:hidden;height:280px;width:1382px;”> <div id=’gmap_canvas’ style=”height:280px;width:1382px;”></div> <style> #gmap_canvas img { max-width: none!important; background: none!important } </style> </div> <script type=”text/javascript”> function init_map() { var myOptions = { zoom: 14, center: new google.maps.LatLng(47.4464864, 9.526921600000037), mapTypeId: google.maps.MapTypeId.HYBRID }; … Read more

[Solved] programatically search a place in google map API by passing place name

using JSON <?php function geoPlaceID($location) { $locationclean = str_replace (” “, “+”, $location); $details_url = “https://maps.googleapis.com/maps/api/place/textsearch/json?query=” . $locationclean . “&key=YOUR_KEY”; $du = file_get_contents($details_url); $getDetails = json_decode(utf8_encode($du),true); if ($getDetails[‘status’]==”OK”) { $a=$getDetails[‘results’][1][‘types’]; print_r($a); // echo implode(” “,$a).”<br>”; } else { echo “Place ID not found”; } } geoPlaceID(“kfc”); ?> using XML <?php function place_ID($location) { $locationclean = … Read more

[Solved] Javascript – Create a map with Google API

The JSON data will not display the map. If you want to display the map you have to write Google Map API to intercept the JSON data. Use this as a reference –https://developers.google.com/maps/documentation/javascript/tutorial Or you can use Embed API, use this as a reference – https://developers.google.com/maps/documentation/embed/start solved Javascript – Create a map with Google API

[Solved] Draw Line on Google Map using C# [closed]

Here’s how to do it using the Javascript API v3: https://developers.google.com/maps/documentation/javascript/overlays#Polylines But it sounds like you may be using some sort of control that does it for you in C#. I’m going to guess because you haven’t provided more information about what you are using to create the map, but let’s assume you’re using: http://googlemap.codeplex.com/ … 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] 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] setCenter with array values – Google Maps API

From the documentation. google.maps.Map.setCenter takes a google.maps.LatLng or a LatLngLiteral as an argument. This should work: <li><a onclick=”map.setCenter(new google.maps.LatLng(cityList[0][1], cityList[0][2])); return false”><script>document.write(cityList[0][0]);</script> </a></li> working code snippet: var map; var cityList = [ [‘Atlanta, GA’, 33.840644, -84.238972, 1, “text 0”], [‘Austin, TX’, 30.402887, -97.721606, 2, “text 1”], [‘Boston, MA’, 42.364247, -71.078575, 3, “text 2”], [‘Chicago, IL’, … 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

[Solved] Google Maps – markers from database displaying information from the last row only

You only have one infowindow, when you open it, it displays the last content you gave it. Change your click listener from: google.maps.event.addListener(marker, ‘click’, function() { infowindow.open(map,marker); }); To (set the new content before you open it): google.maps.event.addListener(marker, ‘click’, function() { //set the content of infoWindow infowindow.setContent(eventContent[0]); infowindow.open(map,marker); }); working fiddle code snippet: var geocoder; … Read more

[Solved] How to add Google Maps Api in a project? [closed]

if you want to add a map without iframe, check out this jsfiddle http://jsfiddle.net/cQTdc/ <html> <head> <script type=”text/javascript” src=”http://code.jquery.com/ui/1.10.3/jquery-ui.js”></script> <script src=”https://maps.googleapis.com/maps/api/js?sensor=false”></script> <script> function initialize() { var map_canvas = document.getElementById(‘map_canvas’); var map_options = { center: new google.maps.LatLng(51.372658, 1.354386), zoom:16, mapTypeId: google.maps.MapTypeId.HYBRID } var map = new google.maps.Map(map_canvas, map_options) } google.maps.event.addDomListener(window, ‘load’, initialize); </script> <style> #map_canvas { … Read more

[Solved] How to show labels with direction on google map api

One option would be to create that <div> as a custom control, create the links for “View larger map” and “Directions” by sending the user to Google Maps. proof of concept fiddle code snippet: google.maps.event.addDomListener(window, ‘load’, init); var lat = 25.2091043; var lng = 55.2725799; function init() { var mapOptions1 = { zoom: 18, center: … Read more