Find hidden markers in google maps - javascript

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.

Related

How to add location-pin to Cartagen map?

I don't see much mention of Cartagen on stackoverflow, so please point me somewhere else if there is a better forum for this question. I am using Cartagen JavaScript library to render a map in the browser. I want to place a location pin on the map. I figure there must be an easy way to do this but I haven't been able to find it in the documentation or code.
I found a way to place a map-pin. I used User.set_loc() to set the location of the default User. Then I used User.mark() to mark that location. I changed the code in User.mark() from drawing a circle for the mark, to using ctx.drawImage() to put my .png of a map-pin on to the map. I might be able to make other pins if I make other instances of User.
This use of User.mark() did not create an object that will be automatically be used on every redraw of the map. For that I think I might have to use something like the User.add_node() and User.toggle_way_drawing() whereby a node is created, tagged with "user_submited", and put on the Geohash.objects array. The Geohash.objects array is used by Gartagen.draw() to add user-submitted objects to the Cartagen.feature_queue which are then rendered on the map.
But I haven't totally figured out the use of User.add_node() yet, so instead I added code to Cartagen.draw() to call User.set_loc() and User.mark() every time the map map is redrawn.

Google / Bing Maps Show All Cities

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.

Creating a small database of DC bikeshare locations

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

How can I access, then animate an existing leaflet map polyline using Javascript?

Can anyone suggest how I can access then animate the red polyline here using javascript:
http://gymloop.lukem.co.uk (login: User2/pass2, then select 'Challenges')
I want to animate the polyline from the first marker to the end of the red line (think Indiana jones but without the map moving and NOT using google maps). It needs to be dynamic as different users will have travelled different distances.
I need thew solution to work in FF, IE7+ & Chrome
I am using cloudmade's leaflet maps and am keen to avoid using google maps.
There is further information in my related question at gis.stackexchange
I've checked out your code and it seems you're using the leaflet API to draw the lines. Because of that, I've decided to write a somewhat generic function that animated those kinds of lines. (By the way, I'm confused why that API uses path tags instead of line tags, but I've rolled with it.)
Here's the code: http://jsfiddle.net/mihaibirsan/Wzvre/
I'd like to polish it a bit more, but I wanted to put a foot in the door for that bounty. :D (I'll get back to polishing and post an update in a few hours, once I've done some other work.)
I highly recommend jquery_svg plugin. I've been using it and there are plenty of features, including animation, text on path, user interaction.

Interactive JavaScript Bar

I'm looking for a way to create an interactive bullet graph, which will allow the user to click anywhere in the graph and set a marker, then calculate some simple values based on where this marker is at. For example, I'd like it to look similar to this:
http://www.usrecordings.com/test-lab/bullet-graph.htm
Yet, allow the user to click inside it and have it calculate values. I don't want the user limited to the axis values either, it should be able to figure out what the value is between them. Has this been done anywhere before or do I need to start something from scratch?
Flot may be able to do what you need.
Check out some of the examples, particularly the interactive one. It's open source, so you can add any functionality you need to it. This should be a good starting point.
HTML canvas is a great place to start. A brief google search showed there may not be many interactive charts available. These are a couple HTML canvas examples, the first being math, the second the w3c spec: Polynomials, HTML Canvas w3c. I've found that searching for HTML canvas game examples produce many more tutorials than straight HTML canvas examples. I don't know what your programming abilities are, so I'm giving you these links with the assumption you have javascript experience.
Have fun.
Oh and thanks for asking if it's been done before.

Categories