Display markers for local amenities such as swimming pools, schools,parks,restaurants,hospitals etc
Can anyone point me in the right direction on how to display these. Ideally I would like to be able to toggle the markers on and off.
My site only requires a map of the India and that too in Bangalore location.
Thanks in advance
May be you can use Places API to do what you want : https://developers.google.com/places/documentation/search
Regards,
Related
I am going to add a number of countries in the array of setComponentRestrictions in Google Map autocomplete, so that address in only those countries can be filtered in the autocomplete.
But I see that only first 5 countries work for this, not all the countries I added
Is there anyone can help me with this?
Thanks in advance
For now, Google Map Autocomplete can recognize 5 countries at maximum as a restriction
I am showing world map on dashboard where few locations needs to shown as highlighted. I need to highlight few locations on map based on airport code. For example, IAD is airport code for Dallas, So if a data-center having IAD in its name then Dallas will be highlighted on Map.
Till yet, I tried leaflet.js an open source geo map library. but it requires coordinates to pin a location. I want something like google map (can't use google API as paid tool) where you may pin a location by its name.
If somebody could suggest a library or a heads-up towards how to achieve it, It would be appreciated.
If you are using Leaflet, you will need lat-lng coordinates no matter what.
If you only have placenames, then you'll have to run a geocoding query to convert the addesss/placename into lat-lng coordinates. You might want to start your search in the list of geocoding plugins for Leaflet.
I am creating a control to be used in a DNN site that will display the US map using jVectoMap.
When I click Colorado I need the state map to appear with the counties defined.
Eventually I would like to have all of the US states but Colorado is critical right now.
I have tried running different Shape files through the converter as documented on the website but so far I haven't been able to get the counties. I have also contacted the developer three days ago now but have yet to hear back.
Unfortunately I am on a deadline for this and don't have anymore time to waste trying and failing.
Does anybody have a Colorado map with the county lines that is copyright free to use? Or is somebody willing to make one($-PM me)?
Any help is appreciated, thanks.
BTW if there is another library out there that has the US and state county maps available, I'm not married to jVectorMap.
I fixed this problem for all states by downloading the full project for jvectormap - http://jvectormap.com/download/
and under /tests/assets/us the author includes all the js files needed. Just copy them over to your project and use:
new jvm.MultiMap({
container: $('.jvectormap-container'),
maxLevel: 1,
main: {
map: 'us_lcc_en'
},
mapUrlByCode: function(code, multiMap){
return '../js/counties/jquery-jvectormap-data-'+
code.toLowerCase()+'-'+
multiMap.defaultProjection+'-en.js';
}
});
and it will load each of the county maps on demand
How I solved this:
First use this site to find a .svg of the map you need:
http://commons.wikimedia.org/wiki/File:Blank_map_of_Colorado.svg
Majority of these maps are free to use however you see fit. Just read the terms to be sure.
Then open the .svg with notepad/notepad++ etc. and paste everything to this site:
http://svgto.jvectormap.com/
After you paste, hit 'Convert to map' and on the next page you will be able to create the Names (which show up on the hover labels for jVectorMap) and the IDs.
Hope this helps
I have a scenario where I have to highlight borders and shade a state or city after geocoding it (when I got the lang and lat).
How can I do this, do I need to have a complete information of a city to surround it with polylines? Or is there a way that map API can do this for me.
True. Google does not provide this feature. So what we can do... we can have the lat/long of the borders of the state. And we have to draw polygons ourselves.
I used this JS object. And changed it to Google map object (google.maps.LatLng).
For example:
var statesobj = {"AK": [new google.maps.LatLng(70.0187, -141.0205),
new google.maps.LatLng(70.1292, -141.7291),
new google.maps.LatLng(70.4515, -144.8163)]}
So, it's easy now. Loop on these lat/longs. And you can draw the polygons on every state of US.
So this is the solution I came up. If you guys know some better idea to do it. Please share.
You can also try Google Geo Charts:
http://code.google.com/apis/chart/interactive/docs/gallery/geochart.html
Google Maps API doesn't allow you to retrieve city borders. There are a couple other places from which you can get the coordinates, though:
Flickr API
There is a Flickr API based on photos that people tag, but it's only as accurate as the people who tag photos: so it's good enough for bootstrapping but probably not for production: http://karya-blog.blogspot.com/2012/12/fetching-city-polygons-with-flickr-api.html
Natural Earth Data
An accurate alternative is www.naturalearthdata.com. To get that data from there you just need to make two requests: one with the city name and one with their ID to get the parameters:
unlock.edina.ac.uk/ws/search?name=berlin&gazetteer=naturalearth&format=json
and then
unlock.edina.ac.uk/ws/footprintLookup?format=json&identifier=14126951
and you're set :)
Mapzen
If it's possible for you to pre-fetch the data, go for Mapzen, they have a full and pretty accurate database: https://mapzen.com/data/borders/
I'm afraid google maps API doesn't provide any means to access region (country, state, city, ...) shapes.
If you want to highlight regions you have to create custom overlays based on data acquired elsewhere.
Now the basic map example includes a "mashup" of data. When identifying data is fed to the web service, the resulting output can pinpoint locations on the map.
It shows how a geographic Map Marker is placed on the map to identify a specific location. Map Markers can use the default icon (shown) or a custom image, gauge, or even a chart. Optionally, the map can be configured to display a Map Marker Info window, containing additional location-specific data, when the marker is clicked.
It includes data-driven, colored regions (in this case, representing postal codes) overlaid a map of eg Washington, DC. Logi Info can work with GIS boundary data to produce region overlays for states, counties, cities, school districts, and other areas. Like the Map Marker, regions can be clicked to display a pop-up information window with detail data.
I am creating a business directory website which has street addresses stored in the database. I would like to calculate the distance from a given zipcode to the street address using google maps in ASP.Net.
I don't even know where to begin. Can someone please help?
please see the links below
http://briancray.com/2009/04/01/how-to-calculate-the-distance-between-two-addresses-with-javascript-and-google-maps-api/
http://briancray.com/2009/06/23/calculate-driving-distance-google-maps-api/
http://www.ehow.com/how_5142324_calculate-distance-google-maps.html