Google Maps API Business Search - php

I have been looking through the documentation for the API and not sure if it is possible to list multiple select stores near the submitted address.
Ultimately something like the following website: http://www.evolutionofsmooth.com/locator/
It seems like they have each location stored in a db but I can't see it that likely since it would be pretty huge to do something like that.
Any ideas?

They probably did store all the shops in a database. They saved the latitude and longitude of each shop. Then they load, via AJAX, all the shops into the google map. Google maps has a tutorial for creating a storelocator.
Google maps api v3 has a function called ClientLocation this can, on base of the IP-address, return the current position of the user viewing the google map. This way the closest shops can be highlighted or put on top of the list.
Hopes this will help!

Related

Mapbox Directions

I'm working on a project (web application) kind of a trip planner which uses maps to show directions (driving) for the users which they enter destinations of their trip.
and I'm using Mapbox web services to do this.
What I'm trying to do is get the directions for user input which was entered early stage and plot it on a mapbox map.
I know how to get the directions calling the api directly, but I'm having hard time for show this data on a map, I know there is this directions.js which is a pulgin for mapbox but I dont understand how to implement it.
and is there a better or easy way to achieve this. thanks in advance
Mapbox Directions api
Leaflet plugin for the Mapbox Directions API
Check out this code example which does example what you want:
https://www.mapbox.com/mapbox.js/example/v1.0.0/mapbox-directions/

Plotting a database of locations on a Google Map

I have 100K+ lat/longs in a SQL database, and I want to plot them on a google map. The user will input an address to find points close to that address. How should I do this? I have the map working, with the ability for the user to enter an address and have the map center on this point. Just need to add the pins.
I'll be building the front end in JS, and any backend needs in PHP.
Lets start with the search for address, I would use the Google places API. This will allow you to localise your results and get the coordinates of the place in question.
Once you have the coordinates I would head off to the server to do a lookup, if you are using MySQL you can use their spatial extensions which have some handy ways of indexing things spatially.
You say you have 100k items, obv there is NO way that you can send all of them to the frontend to display on the map, you will need to limit your result set or else the users browers will cry tears of blood as it tries to render and handle all of them. You can have a look at the Google Maps Marker Clusterer for a nice way of displaying a high density of markers.

PHP Results and Google Maps

Hi I have a database with a list of contacts in which I am displaying onto a page in a list.
As part of this result set I have a post code, is it possible to generate a google map from that postcode and display it as part of the result?
If it is can any one help me get started?
You can use the post code as the location for your map and google will usually be able to find it.
For example, using the static maps API, the following url will give you a map for the zip code 92117 (which is in San Diego, CA):
http://maps.googleapis.com/maps/api/staticmap?center=92117&size=400x400&sensor=false
You can also do something along the lines of what primehunter326 was suggesting and reverse geocode using the javascript API. Which approach is best depends on what you are trying to do.
Start here for info on how to use the various Google Maps APIs:
http://code.google.com/apis/maps/index.html
Yes it is possible. The basic idea is that you use geocode to get longitude and latitude coordinates for the address. You can then use javascript to display a map on your page with all the points as markers. I'll try to find a link with that goes over it in more detail.
Here is a link which goes over geocoding
You'll need an API key in order to use their services, here

Google Map with php mysql

my problem is i want to show my registered site user on to google map but dont know how to locate the user, means i dont know the latitude and longitude of every user . I am a newbie in google map so plz help
Thanks a ton
What location data do you have for your users? Cities, states, countries?
You might want to have a look at Google's Geocoding APIs.
there are two possible ways of doing this.
Ask the user to search a google map and place themselves on it. Look here for an idea on how to do this http://www.designing4u.de/2008/08/google-maps-jquery-and-xml-saving-markers-with-user-input/
Use an IP to Location database to find out the location based on their IP. Look here for how to do this http://www.ip2nation.com/ip2nation
There is no way to reliably locate a user using their IP address. However if you are developing for a mobile device it may be possible to acquire their GPS coordinates. Or you could require them to enter an address and place a point on the map from that address with geocoding.
If you are collecting the address of each registered user, you can get the latitude and longitude on the server-side through the Google Maps HTTP Geocoding Service.
You would use the following HTTP request:
http://maps.google.com/maps/geo?q=Oxford+Street,+London&output=csv&sensor=false
Simply change the q parameter with your user's address.

php class for seo

I recently use the great php class call : Google Analytics PHP API. I manage to get it working to get a lot of info and stats for my 25+ website that have analytic
Now i like to get more data like
The page rank the google placement
(where i am on google #325 or #520)
Google Page Rank
Google Indexed Pages
Traffic Rank
Inbound Links
DMOZ Directory
Yahoo! Directory
get a summary (my way) much more like http://websitegrader.com
do you know a php class to do that ?
I guarantee you're not going to find one "class" that does all that for you.
Manually checking your site's rank on Alexa is probably going to be your best source of information on top of what Google Analytics is already giving you.
Google Analytics does NOT require any sort of API.
The site you linked to asks for your Google username/password. I'm flagging this question. I encourage others to do the same.
you can get all from alexa api (Alexa Web Services)
http://aws.amazon.com/awis/
but not free
$0.00015 per request ($0.15 for 1,000 requests)
i thought in the past to build a website to arrange an Arab sites
but arrived at the checkpoint
somme website use awis
www.statbrain.com
www.websiteoutlook.com
www.websitevaluecalculator.com

Categories