I am building a twitter, google maps mash-up.
I am trying add user's twitter profile picture to the map as a custom marker,
I know how to add custom markers from images but was wondering if there was any easy way of adding a different image for every marker.
You can make google maps use a kml file which can be dynamically generated based on current twitter pics. A kml file is a basically an xml file that contains geo-data.
The following link will provide you with examples, look at Marker Icons. There is also sample kml format for what your placemark mark up should look like. It consists of the coordinates of the marker and the picture you want to use.
http://econym.org.uk/gmap/kml.htm
Related
can we show building numbers on apple map? if yes then how can we achieve this? please refer the screenshot.
Unfortunately you can not update Apple map but yes for alter-net solution you can use google map for showing you floor plan on map.
By using "Map Objects" feature of google map you can add your custom floor plan on provided location.
Check this link of Map object in Google map: Map Objects
There is one more solution for your requirement.
Use SVG file and annotate your building number on it.
for SVG map update check this link: SVGKit
One more useful link from SO: Map won't show building numbers (tileMill + OSM)
Hope above information will help you to go further in your R&D for building number placed on map.
I am using Map kit to display a bunch of locations and data related to it.
When I use Apple Maps I can see that locations have related images provided by Yelp.
Does map kit provide a way to access those images? Is there any way to obtain images from a respective location??
Thanks.
Those images are not part of the SDK and you can't use them within your app directly, but you can use Yelp API to get business information, including images. Check https://www.yelp.com/developers/documentation/v3/business for more information.
Is there a way to display (and search in markers data) "my maps" layer in a GMSMapView in the Google maps SDK for iOS? Searched docs but couldn't find.
"my maps" are basically custom maps with additional layers you can create on top of a google map region, I want to use a public one that has tons of layers and markers already in place (I do not want recreate them programmatically).
basic example for "my maps" data:
https://www.google.com/maps/d/viewer?mid=zRF3RCwWPTMg.k8Zh-QyncJYc
thanks!
Unfortunately it looks like there is no API for accessing My Maps, see here:
Google maps API - get my custom map
However, it looks like it's possible to convert your My Map into KML, either a one-time download or a live link to the current map content, see here:
https://support.google.com/mymaps/answer/3109452?hl=en
(I found this via Add Google "My Maps" Layer to Google Maps Javascript API, although the UI to get the KML has since changed from that answer in 2009).
Once you have the KML you can't add it directly to your map, but you can parse it and then add each of the markers etc, see here:
How to load a KML file URL into Google Maps using iOS API?
Is it possible to have specific markers based on a user's search with Google Maps API? For example, I'd like to be able to create unique markers for different food cuisine types: american, asian, european, and indian. If the user types in american for example, can I add a special marker for this and if so, how can I achieve this?
Google has a great API that details how to do what you need pretty well. The Google Places API has some examples of how to search for places. The Maps API has an example on how to add custom marker symbols. Once you get the data back from the query posted, you can parse it to get details on the restaurant and associate an icon with that restaurants position
I think you are looking for the iOS SDK (I just looked at your tags):
https://developers.google.com/maps/documentation/ios/marker
I want to display data from kml file, which is situated here http://maps.google.com/maps/ms?f=q&msa=0&output=kml&msid=201434694813577429889.0004ba2d12b7538131e5e .
It is output from MyPlaces. I want to do more stuff with it - change icons, use clustering and so on, so embedding is not good solution.
I've tried to load the file using KmlLayer in GoogleMapsApi, which works, but I don't know, how to change icons and how to get data for each marker (coordinates, description, ..).
Actually, what I need is just the access to the data in kml, I am able to do all other programming on my own. The file is continuously changing so I need to do all the stuff online.
You could use a 3rd party KML parser (through a proxy) like geoxml3 or geoxml-v3. They render the KML using native Google Maps Javascript API v3 objects, you can modify those using the Google Maps Javascript API. When you do that you lose the benefit of KmlLayer's tile based rendering, so with complex KML, you may have performance issues.
example with your KML (seems to have a character encoding issue)