About billing about map movement on Maps Javascript API - javascript

I need to include google map in my website for assignment purpose.
I understand that charges will occur with a count of loading the map. If you move multiple markers using PanTo, PanBy, or setCenter methods, will they be charged (counted as 1 count)?

If you’re using the JavaScript Maps API and creating the maps with google.maps.Map() then panning scrolling zooming don’t generate more loads.
You’ll be charged per map load.
More information here

Related

How to integrate a smaller map into a larger map

I am trying to integrate an area which I have created as it's own map onto a larger map.
I would like to show the location of this organization on a map with it's surrounding areas. When I zoom in onto the area of the organization, the details/layout of the smaller map(layout through the organization) should become visible.
With the map I have created, it is places on an image with outlines of certain buildings and stores (it's a mall), I am able to calculate distances among other operations. I just need to figure out how to implement zooming in to reveal my smaller map on this larger map. This map will be displayed on a website as well as integrated on a native mobile application, such as an android app, however implementation on the webpage is more important.
The Google Maps API provides map tiles at various zoom levels for map type imagery. Most roadmap imagery is available from zoom levels 0 to 18. The MaxZoomService object provides a simple interface for discovering the maximum zoom level at a given location.
Accessing the MaxZoomService is asynchronous, since the Google Maps API needs to make a call to an external server. For that reason, you need to pass a callback method to execute upon completion of the request. This callback method should process the result.
To initiate a request to the MaxZoomService, simply call getMaxZoomAtLatLng(), passing the LatLng of the location and a callback function to execute upon completion of the request.
Here are related SO ticket which discuss Maps API zoom range: google map API zoom range / Using setZoom() after using fitBounds() with Google Maps API V3

embedded google map change center or zoom

I have an embedded Google map (the kind you get an embedded iframe for using the Google maps site) with multiple markers on it. This is good so far as it goes but I need another function.
What I want to do is allow a person visiting the page to change to centre point by entering their postal code. I'd like them to also be able to change the zoom factor.
While there is massive amounts of documentation on using Google maps and on using the Google maps API, what I'm missing is a way to use the existing embedded Google map rather than creating a new blank map and populating it with markers.
The difference is important because it's quite easy to use the Google maps site to upload a .csv file with names and addresses that the Google map sorts out and displays. Doing the same thing with a blank map and javascript each time the page is loaded runs you up against the API transaction limits.
How can I tell the Google map API to connect to an embedded map instead of creating an empty one?

Google Maps API V3 - Load map first and then load markers

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.

Displaying Historical Maps

I have an application where I need to show historical maps. Is there a way to use the Google API for that, ie show a map of Europe for the year 1800, 1900 etc, with different borders and country names?
I am not particular to any language and also welcome solutions that might not involve the Google API but another library or service
I am not aware about such functionality in Google Maps right now. However, it should be noted that Google Earth has several historical maps (including a world map from 1790, a 1833 US map, a 1680 map of Tokyo, and a 1716 map of Paris), so chances are they will add this functionality to Google Maps at some point in the future.
Google doesnt have historic ability built in but it does have code to allow you to tile, zoom and display your own images.
Also take note that for commercial application I beleive you might need to license it.
Google maps support having different tiles (the map picture) under them. So if you can get a map of 1800 then you can show it in the map (but probably you would need a high resolution map).
And so on.

Google Maps Best Practices?

We started using Google Maps on our web application rather extensively. It worked fine at the beginning, but as we add more markers we find that the performance are not quite there. Although I'm quite sure we don't use it in the most efficient way.
I am looking for information about Google Maps best practices and tips'n tricks. Any suggestions?
You might find some good ideas in this article, which compares several methods of handling large amounts of markers.
Marker Manager has some limitations, depending on what you're trying to accomplish; for instance, it doesn't allow every marker to be available from every zoom level. I created a clustering function based on the principles discussed in this tutorial. It uses the Static Maps API in PHP, but the principles behind the clustering can be used however you want.
Update: This clustering utility was just released: MarkerClusterer
Use Marker Manager.
Limit markers to what's visible (ie, understand the window boundaries, and only show markers that fall inside the window)
Learn to listen for various map activities and react - such as viewpoint moves, zooming, etc - to update the markers
Don't show markers that overlap significantly - show only one marker (perhaps a different shade or color to denote there are several points at this marker) and let the user zoom in if they want to see the individual markers. Use the tooltip to show a zoomed in window if you want to get fancy.

Categories