I need to create an instance of a Google map that uses markers from an external Google Map. More specifically I need to grab all the markers from the "source map", run some algorithms and filtering and them add them to my newly created Google Map.
I've tried searching both the Google Maps API and forums for clues, but most of them are about getting markers from the current map, and not externally.
Do I need to use the KML source somehow?
Thanks in advance!
Related
I'm building an angular app in which I require user profile images to be shown on google map as markers.
The location comes from an API as JSON with Lat, long and images of user.
Plus, I'm using clustering in maps. Whenever I click the cluster, the markers with images should appear.
I'm trying it both AGM maps library as well as Google Maps Javascript API
Is there a way to do it?
To use custom markers and use your own images. You simply have to pass the url of your image to the an icon property of the Marker object as below...
var marker = new google.maps.Marker({
position: point,
icon: 'http://contoso.com/image.png',
map: map
});
if you need more control over that image and how it is rendered. Google Maps API provides and icon object specification you can use
var icon = {
url: 'http:contoso.com/image.png',
anchor: new google.maps.Point(0, 0)
}
There are a lot of documentation and examples in Google Maps APIs website
If you don't want to use google maps default marker and want to add custom HTML to markers,
Check this plugin out - https://github.com/googlemaps/js-rich-marker
Really easy plugin to use HTML as google maps markers.
Note - Basically this plugin uses custom overlay as markers. So, compared with default google maps markers, I think using this makes the map becomes a bit heavy to pan around when there are many markers (especially on smartphone)
I need to create a heat map with google maps as like in the image,
I got some details from
https://support.google.com/fusiontables/answer/1032332?hl=en
But i don't know how to implement it with a website.Is there a js api for this?
Please help to create a heat map for some specific location with custom data.
I have KML string and I want to display that on a Google Map. Instead of a file, I have the string. This is because I have my KML data inside the Fusion Tables, and I need to make something similar to this: https://developers.google.com/fusiontables/docs/samples/custom_markers
I only have KML data, not coordinates, so I'm not sure how I would display that.
I tried this, but it didn't work:
var marker = new google.maps.Marker({
map: map,
position: '<polygon>....</polygon>',
icon: new google.maps.MarkerImage('https://developers.google.com/fusiontables/docs/samples/images/fusion_tables-32.png')
});
Any help is much appreciated!
Thanks!
Take a look at these
The geoxml3 project is an effort to develop a KML processor for use with Version 3 of the Google Maps JavaScript API, it now allows access to individual markers, polylines and polygons, rendered from KML.
Some useful demos with KML
I came across this line: https://developers.google.com/fusiontables/docs/samples/change_infowindow_content
It answered my question!
I'm trying to add markers on my Google Maps V3. I want to have similar markers as on Foursquare, where they join an icon and image (with JS) and create one big marker.
Does anybody know how to accomplish this?
Rich marker perhaps?
Rich Marker v3
PS. the copy of richmarker.js from here worked better for me
I am creating a page to show a list of locations(markers) on Google maps. The number of markers is dynamic and can be quite large. This will adversely affect user experience when the map (along with the markers) are taking too long to load.
Can anyone point me in the right direction to load the map first and then load the markers. Any help much appreciated.
Use a marker manager. I used one for Google Maps API v2 (for on-demand loading of ~2000 markers via AJAX) and I am sure there's one for API v3. A marker manager is class that allows you to selectively display markers on a Google Map. Instead of adding markers to map, you use add them to the marker manager and it takes care of when and how to display the markers. The markers that lie outside the "visible" region are removed hence its fairly memory efficient. A marker manager class may provide "clustering" option (or may be you need another class for this). A cluster manager displays one marker that encompasses multiple markers when markers are too close, specially at high zoom level. Hope this helps you in the right direction.