google-maps
update markercluster after removing markers from array
Yes you can. Creating the map Assuming you have created your MarkerClusterer object something like this: var center = new google.maps.LatLng(10, 20); var map = new google.maps.Map(document.getElementById(‘map’), { zoom: 6, center: center, mapTypeId: google.maps.MapTypeId.ROADMAP }); var markerClusterer = new MarkerClusterer(map); Adding markers You can add multiple markers to it something like this: var markers = … Read more
How to find latitude and longitude using C#
You could try the NuGet package GoogleMaps.LocationServices, or just spin of its source code. It uses Google’s REST API to get lat/long for a given address and vice versa, without the need for an API key. You use it like this: public static void Main() { var address = “Stavanger, Norway”; var locationService = new … Read more
How to calculate the distance between two GPS coordinates without using Google Maps API?
Distance between two coordinates on earth is usually calculated using Haversine formula. This formula takes into consideration earth shape and radius. This is the code I use to calculate distance in meters. def distance(loc1, loc2) rad_per_deg = Math::PI/180 # PI / 180 rkm = 6371 # Earth radius in kilometers rm = rkm * 1000 … Read more
Google’s Geocoder returns wrong country, ignoring the region hint
Use componentRestrictions attribute: geocoder.geocode({‘address’: request.term, componentRestrictions: {country: ‘GB’}}
How do I load google maps external javascript after page loads?
I tried this solution of mine and it worked. Run the script on dom ready using jquery. basically instead of using your function initialize like this : function initialize(){ /*You code */ } do this: $(function(){ /*You code */ }) And no need for google.maps.event.addDomListener(window, ‘load’, initialize); Anymore. Edit #1 : I am currently facing … Read more
Disable CSS Styles in Google Maps (3.14) Infowindow
From what I can see the new css rules are guaranteed to break styling for all markers, controls and info windows web wide, so maybe this will not remain in the 3.exp version long enough become part of an official release. In the meantime to protect you self against breaking changes like this. You should … Read more