Is there anyway to overcome 5 custom urls to request?

From the Google Image API documentation

The Static Map Service allows up to five unique custom icons for each request. Please note that each of these unique icons can be used multiple times in a static map

I have over 5 custom icons for each request, possibly up to 40.

Is there a way to overcome this? Can sprites be used in static maps to overcome this?

+3


source to share


1 answer


This is how I got around it:

  • You probably already know how and depending on your source it will be different, but collect all your map data. The required bits will be: center point, scaling, map type, and output image size. My guess is that the sensor (if the app has GPS access) is false. You will also need all the information about your marker, which will contain the icon that you are going to use, and the geo-coordinates from them.

  • I posted all of this to the CF page which will do all the magic.

  • State your first 5 points as usual. Get results as .png

  • Compare the following 5 points, but add "style = feature: all | visibility: off" to the query string, get the result as .png. This will give you a png with a transparent background, but all of your marker icons will be on it. It will be the same size as the original map and the markers will be positioned correctly with this rectangle.

  • Watermark this image over your original map. NOTE. This step will likely vary depending on the language you choose and the image features it offers.

  • Repeat 4 and 5 until you have all of your markers.

  • Write you an image with all the markers on it.

  • Pass a link to this file instead of a regular google link.



I have a more detailed explanation here with some sample code in ColdFusion.

0


source







All Articles