moshen / node-googlemaps

A simple way to query the Google Maps API from Node.js
MIT License
560 stars 148 forks source link

How to return a displayed map? #20

Closed hhtran closed 11 years ago

hhtran commented 11 years ago

I've been trying to use this wrapper for my node.js project, and I was wondering: How would one use this API wrapper to return a non-static map?

I've used Google's API directly before, and have been able to manipulate and change maps through that, but I have not been able to find a way to get a non-static map using this node.js API wrapper (that also displays on the page).

My end goal is to perform a nearby places search and have an updating map that has a marker on the data returned by the API. Is there a way to do this using this maps API wrapper?

moshen commented 11 years ago

I'm not quite sure I understand the question. If you're referring to the client side maps js library/api, then this is a completely different animal. This is an API wrapper for the maps web services. For example, querying for directions, geocoding, etc.

It sounds like you want to use the client js library/api and the nodejs api on the back end.

So...

  1. build your client using the client library and create whatever event trigger to search for nearby places..
  2. create an http server/service to respond to that request, calling the maps webservices to get the places, then returning them to the client to be rendered

The Places search and Place details apis have been implemented in this wrapper

hhtran commented 11 years ago

Ahh. I didn't realize that this was purely the maps web services. Thank you.

moshen commented 11 years ago

NP :smile: