Plotting "Points" on Google Maps using JavaScript API -
i'm loading extensive set of points (latitude, longitude pairs) google map. problem google maps plots these points markers (the default kind), while i'd rather have each point plotted "point" in map: https://www.google.com/maps/search/atm/@54.0260702,-1.6780445,5z
rather marker shown here (on cimarron national park): https://www.google.com/maps/dir/great+bend,+ks,+usa/cimarron+national+grassland,+242+highway+56,+elkhart,+ks+67950,+united+states/@37.7162446,-101.3770814,8z/data=!3m1!4b1!4m13!4m12!1m5!1m1!1s0x87a38bb5b59e293d:0x32155928d84780ee!2m2!1d-98.7648073!2d38.3644567!1m5!1m1!1s0x8708c3c3259cc53b:0x8109b72736458f11!2m2!1d-101.79!2d37.124167
any thought how can achieved through google maps javascript api ?
a quick , dirty illustration (took documentation , modified it):
map.data.setstyle(function(feature) { homecoming /** @type {google.maps.data.styleoptions} */({ icon: "https://maps.gstatic.com/intl/en_us/mapfiles/markers2/measle.png" }); });
working example
javascript google-maps google-maps-api-3
No comments:
Post a Comment