Trying to find a way without zooming in real close to tell Google or Bing maps to show all cities. Bing does a good job for the most part but still when you zoom in it shows a whole different set of cities.
I have a large monitor this map is going to be sitting on and really need it to show more than just the cities it shows on for example zoom level 8 or 9 on Google. Right now I load in roughly 2900 different locations and mark them on the map so I am trying to do it via the API no just going to maps.google.com
Has anyone come up against this issue and found a fix? Did some searching here as well on Google and maybe looking it up wrong but haven't found anyone looking for something like this.
Hi you can do that by using the Image Map Type API by implementing the mapType interface. Please refer to this link and implement the code in the way given in the example, replacing details with your specifications.
Hope this will help!!
I couldnt find either enough information to get "mapType" to work how I was wanting or it just doesnt do it. The goal was to be at lets say a zoom level of 8 and see every city in the US. I couldnt get any of the suggestions to do that.
Here is what I found that allowed me to do it my self though:
http://google-maps-utility-library-v3.googlecode.com/
Basically I put in a transparent marker so it didnt show up then put info boxes with the names. This actually worked really well for me because I can zoom out 100% and still see all the names. Although at that level they would be overlapping being able to zoom in and out a few ticks and still see everything is great.
Related
I'm working on a Google Maps project where we want the customer to type in an Autocomplete address and then be taken to that place on the map.
My manager wants a consistent "viewport" result when compared to the viewport achieved when searching for the same place on maps.google.com.
I found an inconsistent result for a certain location, in particular for the Australian city of Sydney.
The result I get back from Places Autocomplete for Sydney looks quite zoomed in (I used the response's viewport data and call map.fitBounds(...). I'm a first time Stackoverflow user, so I can't post images yet - instead, the effect can be seen by entering 'Sydney, New South Wales, Australia' at the following page: https://developers.google.com/maps/documentation/javascript/examples/places-autocomplete
Alternatively, if I use the Geocoding API instead and take the viewport data response and use that to call map.fitBounds(...), I get a zoomed out view, similar to what I would see when I look for Sydney on maps.googles.com.
I would be very grateful for any suggestions that would provide a solution that gives my customers a viewing result that is 100% consistent with maps.google.com. For example, should I be using a different version of the Autocomplete API, or pass a special parameter? Ideally I would prefer to not be calling the Geocoding to retrieve and override the Autocomplete viewport response, since that would double up my API traffic and double the hit on Google's servers.
I look forward to any advice anybody can offer, thank you!!!
Are you wanting the map zoom level to be consistent after the search ?
I do android with google map. And just by looking at the code from the provided link above.
change that map.setZoom() method to the level you want might help.
I haven't done javascript google map api yet. Just taking a wide guess.
If I am answering the wrong question, please correct me.
So i found one custom map with only zoom buttons in which markers are shown only at 100% zoom. It is not very convenient, so maybe is there some way to show all markers on normal zoom? Some js code which i can add to url or something like that? Оr may be somewhere in the source code are coordinates of markers?
The short answer: No, not really, unless you look in the source :)
The answer that is a bit longer:
As I take it you want to write something in the querystring of the webpage, and then see the markers. This would of course be possible if the one who made the site had made code to do that, but I don't think he would.
The only possibility is to look in the source code of the page and see if you can locate some sort of array that holds the markers. If you find one such array you can use a debug tool to execute your own JS where you run through the array and run .setVisible(true) on all the markers.
This is somewhat of a big hack, and I am sure the owner of the site has a good reason to not show the markers unless you are zoomed in, so I wouldn't mess with it unless it was really important. If you want the full list of markers you should ask the owner of the site.
I am using JavaScript code to show the multiple pin points on Google Maps using Brownfield. I set the first clicked point as the center point, and when the user clicks on any other point (which is not the center point) I want to display a route mapped from the center point to that clicked point.
I would appreciate help of any sort, including ideas besides using JavaScript.
Google has a number of services available to people who program using their Maps. Go to https://developers.google.com/maps/documentation/javascript/reference and check out the directions services. I'm not very familiar with them, but I'm guessing it's similar to their other services. You make a directions request object supplied with point a and point b, and it will send a message to Google asking for the appropriate directions, which will be returned in some sort of result object that you can use to show the way. Update point b each time the user clicks and resend the google request, and it should update the path. Check out the API and it shouldn't be too hard to get it working. As for alternatives to javascript, Google Maps is written all in javascript, so there really is no other way. But I know from experience, most of their supplied code works really well, so I bet you can get it working!
Following link will show the route between two points:
J2ME/Android/BlackBerry - driving directions, route between two locations
I am a Massive n00b with this so please forgive my terrible ignorance.
I'm trying to work out how to do what may sound simple in placing an overlay over some Australian suburbs on a Google Map on a website using its API.
I've been reading about overlays and how you can define polygons with coordinates as per http://code.google.com/apis/maps/documentation/javascript/overlays.html#PolygonOptions - and its example.
I want to place an overlay on the suburbs of Black Rock, Beaumaris, Cheltenham, Mentone, Parkdale and Mordialloc in Victoria, Australia - so obviously I can work out the coordinates of that area and define it in the code. But this process would involve some work and time, probably not be specific and require many coordinates. What I was wondering is if anyone knows if/how it might be possible to use the MapTypeStyleFeatureType administrative.locality object's of Google Maps API - http://code.google.com/apis/maps/documentation/javascript/reference.html#MapTypeStyleFeatureType - which may already have this area defined with those suburb names - so I can get the overlay to cover the area of those suburbs as Google defines it? (for example, put those suburb names into the code and the overlay occur on them automatically?) (or something!)
Sorry for what this is probably a really amateur explanation and question but I thought I might be able to do this myself and it might be possible with the help of a few nice, smart people :)
Many Thanks,
Tom W
I'm kind of new to this site and programming in general, so please excuse me if I say something incorrectly.
I need to find a list of all the latitude-longitude locations of the bikeshare kiosks in DC. The map with all the stations can be found here. Basically I can't figure out how to do this without manually going in, finding where exactly the kiosk is on the map on the bikeshare website, and then locating it through google maps to find the lat/long (I found out that this can be done by right clicking on the location in google maps). I've searched long and hard to see if there is a database somewhere that has stored this information, or if I can get it from the bikeshare site directly, but I can't find it anywhere.
I can do it for the DC metro station by clicking on the map directly (like here, if you click on the map, you can see a google maps page pop up with the lat/long location).
This is my first time using the Google Maps API. I want to be able to get these locations because I want to depict it onto a custom map of my own using Javascript (which I have also never used before). Any kind of help would be extremely helpful!
Diving a bit into the source code you'll quickly find http://www.capitalbikeshare.com/js/maps.js, and there you can see that the positions are loaded from http://www.capitalbikeshare.com/stations/bikeStations.xml.
You also might have found that using the Network tracker in your browser's debugging console.
http://www.capitalbikeshare.com/stations/bikeStations.xml