Google Map Number Markers - google-maps

I have to show numerous (approx 500) numerical markers on a map, I generated 300 using
http://mapicons.nicolasmollet.com/numbers-letters/
However it only goes up to 300 - how do others show large number of numerical markers on a map?

I would recommend using the Google Charts API, with pins:
http://code.google.com/apis/chart/infographics/docs/dynamic_icons.html#pins
Or bubbles:
http://code.google.com/apis/chart/infographics/docs/dynamic_icons.html#bubbles
Here is a bubble that shows 500:
https://chart.googleapis.com/chart?chst=d_bubble_text_small&chld=bb|500|C6EF8C|000000

There are a few ways you can do it:
Generate the other images your self
Generate the images dynamically
Use a custom overlay instead of a marker and display HTML

Related

How to split markers on Google Static Map on same address?

In My application I have to show split of markers which means all markers should be visible. If one marker geo distance is longer than others it should show like below.
In Google Dynamic Map API which is possible by “Spiderfier”. Refer the link below and below image.
http://jawj.github.io/OverlappingMarkerSpiderfier/demo.html
Like this option, I have to split of all markers in Google Static MAP API.
Any possibilities there to visible all markers ?
Static Map URL:
http://maps.googleapis.com/maps/api/staticmap?sensor=false&channel=Resivalue&scale=2&center=29.900598698735365,-95.69396430030821&zoom=13&size=1300x500&maptype=roadmap&markers=color:green%7Clabel:S%7C29.89357,-95.68815999999998&markers=color:pink%7Clabel:1%7C29.893167,-95.68737599999997&markers=color:pink%7Clabel:2%7C29.893904,-95.688424&markers=color:pink%7Clabel:3%7C29.892301,-95.68776500000001&markers=color:pink%7Clabel:4%7C29.892343,-95.68866200000002&markers=color:pink%7Clabel:5%7C29.894404,-95.689029&markers=color:pink%7Clabel:6%7C29.893235272621563,-95.68611836505124&markers=color:pink%7Clabel:7%7C29.892402,-95.68687699999998&markers=color:pink%7Clabel:8%7C29.891934,-95.688918&markers=color:pink%7Clabel:9%7C29.919640547998576,-95.72656616430663
As stated here
Google Static MAP API Disadvantages :
The main disadvantage is the lack of a map interactivity – if we
need a map to scale, move or if we need to roll down a window after
clicking on a marker; Google Static Maps is not a solution for us.
URL address of a map has a restricted length (2048 symbols) which
sometimes may make impossible to present all needed content on a
map.
Limits also apply in the case of own images markers placing on a map
– in this case it is 4096pixels (64 x 64 px).

Markers are not shown in static google map

I am having google static map url this way with multiple markers.
https://maps.googleapis.com/maps/api/staticmap?size=1100x795&markers=color:red|label:S|45.459041,-98.430198&markers=color:red|label:S|45.469042,-98.430199&markers=color:red%7Clabel:S%7C40.702147,-74.015794&markers=color:red%7Clabel:G%7C40.711614,-74.012318&markers=color:red%7Clabel:C%7C40.718217,-73.998284
But in the map only 2 markers are shown.
I have even tried adding these parameters in the url but still it showing only 2 markers in my map.
&maptype=roadmap
&sensor=fasle
What is the mistake here? can some one help me?
Thanks
It is because of the distance of the markers. The first two markers are near each other and the other three is also near each other, but the first two markers are relatively far from the latter three. I tried getting the Static maps separately and making separate requests for the first two and the latter three and it displays the markers accordingly. I guess because of the distance the markers overlapped.
fiddle of Google Maps Javascript API v3 map showing the same markers (navigate to the markers to see what is happening)
Request for the first two:
https://maps.googleapis.com/maps/api/staticmap?size=1100x795&markers=color:red|label:S|45.459041,-98.430198&markers=color:red|label:S|45.469042,-98.430199
Request for the latter three:
https://maps.googleapis.com/maps/api/staticmap?size=1100x795&markers=color:red%7Clabel:S%7C40.702147,-74.015794&markers=color:red%7Clabel:G%7C40.711614,-74.012318&markers=color:red%7Clabel:C%7C40.718217,-73.998284

Create tiles given images and locations; convert markers to tiles

I've developed a HTML application that displays a map. This map has many fixed markers (they do not change in time).
Due to that:
I want to speed up the application
I want to hide the marker position from malicious users (so they can't use the information I've gathered for they're own porpose)
I want to convert the markers to a tile layer.
I've been googleing without success how to do this. Anyone has faced this problem and has a nice easy solution?
Thanks!
If the markers never change, there is a great solution:
Mapbox.
You can create your map with the markers, then the mapbox servors will send the tiles with the markers.
You can use a quadkey. It'similar to a quadtree. You can download my PHP class hilbert-curve # phpclasses.org. It also uses a quadkey.

Javascript: manipulate individual markers on Fusion Tables layer

I have a Fusion Table of about 1000 entries, and I show them on a map using a FusionTablesLayer. I want to produce a list of the five closest markers to the center of the map. Clicking a list item should produce an info window for the corresponding marker. It looks a lot like the first sample on this site:
https://developers.google.com/maps/location-based-apps
But if I remember correctly, Layers don't allow acces to individual markers. On the other hand, if I use an Overlay the rendering of the 1000 markers has to be done client-side and obviously I don't want that.
How do I do this? Make an Overlay for the 5 markers and a FusionTablesLayer for the rest?
Here is an example showing the 10 closest markers to the center of the map.
Here is an example that does the sidebar.
Here is an example that combines the two.

Max url length with Google Maps static image

I need to create a static image of google map with several markers, and each marker has a custom icon.
In the Api DOC there is the note: Static Map URLs are restricted to 2048 characters in size. In practice, you will probably not have need for URLs longer than this, unless you produce complicated maps with a high number of markers and paths.
The url is very long.... There is the position for each marker and the URL for the custom icon for each one.
I've already tried with POST request ma it is not supported.
There is another way to create a static map image without max length limitation?
A possible way might be this, but i don't know if is it possible: I've create my custom map using the function in GMaps, and i have added all the markers i need.
There is a way to access in static way to this particular map? so in the url i have to give only the center of the map and other parameters (zoom, ...), but all the markers are already positioned.
Or... another idea... Can i submit the URL of a KML with all markers positioned instead each single marker position+icon url?
FYI, Google recently updated the limit to 8192.
Have you tried using a URL shortener for the icon urls? I believe the static map API will respect services that make URLs shorter... might save you a few characters.
You might wanna check out toopola´s API to help working with Google Static Maps, I am about to make my own attempt.
Another idea
find map area that contains all the markers
divide the map area into rectangular pieces (4 pieces for example)
create image url for each part, but include in url only markers and icons visible on map
show images
Мethod of division depends on the markers position.
Yes, you can definitely do this with the Javascript API.
I have built a few applications using that API. It can be a little tricky to get your head around, but it is pretty good. For what you want to do, it would not be too difficult. If the user has to be able to interact with the map and add pins and such, it starts to get a little more complicated because you have to capture clicks and such.
Does the map its self need to be available as a URL, or does it just need to be embedded on some page and that URL can be used?
The Javascript API will work best if you can embed the map into an existing webpage.