Page 1 of 2

Google Places API

Posted: Thu Oct 24, 2013 5:09 am
by Venkate Natesan

1,I created page with Google Map
2,created google places Api Rest Service and tested working fine
3,I invoked the rest service on page load
4,Refreshed the map component after success of service
5,attached response mapping with page map
6,during testing page loaded with only map ,not multiple location
7,attached the response mapping

Image


Google Places API

Posted: Thu Oct 24, 2013 5:15 am
by maxkatz

Mapping like that will create only one marker. You would need to use Google Maps JavaScript API to add multiple markers to the map.


Google Places API

Posted: Thu Oct 24, 2013 6:29 am
by Venkate Natesan

Thanks for your reply ,Please provide more detail or give some reference resource


Google Places API

Posted: Thu Oct 24, 2013 9:10 am
by Maryna Brodina

Google Places API

Posted: Thu Jul 10, 2014 5:42 am
by Gino Borland

Your examples are great for using a database for mapping multiple markers, but we're looking for samples using Google Places API. We'd love a tutorial to implement something like this: https://developers.google.com/maps/do...

Thanks.


Google Places API

Posted: Thu Jul 10, 2014 6:57 am
by Kateryna Grynko

Hi Gino,

You can use this code, just replace:predocument.getElementById('map-canvas')/preWith:pre$("[name=googlemapName]")/preWhere 'googlemapName' is a map component name.


Google Places API

Posted: Fri Jul 11, 2014 11:47 pm
by Gino Borland

Katya,

Thanks for the reply, I appreciate it. I followed your instructions above and received the following Console error:

"Uncaught TypeError: Cannot read property 'PlacesService' of undefined" from my JavaScript file jsGooglePlaces.js:19

Line 19 is: var service = new google.maps.places.PlacesService(map);

from this source example:
https://developers.google.com/maps/do...

FYI, I created a GooglePlaces Service from:
https://maps.googleapis.com/maps/api/...
and defined the following parameters: location, radius, key, types.
I tested this service the the "Test" area with my key, etc... and it seems to work.

I researched the error and found this discussion:
https://getsatisfaction.com/applicati...

Assuming the Places Library isn't getting loaded, I tried to add it via Project/App settings/External resources/http://maps.googleapis.com/maps/api/j...

This was just a guess and seems duplicating adding it as a "Service". So I wasn't surprised to get the console error:

"Warning: you have included the Google Maps API multiple times on this page. This may cause unexpected errors. "

I'm at a loss of what to try next.

----

Perhaps there's another approach? My objective is to show local place types, like "lodging" (https://developers.google.com/places/...)

----

Thanks for guidance,

Gino


Google Places API

Posted: Mon Jul 14, 2014 6:58 pm
by Kateryna Grynko

Hi Gino,

I am sorry for delay, please replace:pre$("[name=googlemapName]")/preWith:pre$("[name=googlemapName]")[0]/preThen this example will work properly: https://developers.google.com/maps/do...


Google Places API

Posted: Wed Aug 06, 2014 5:13 pm
by Gino Borland

Back from a wonderful vacation to Africa!

I tried the change above, with no change. Same error:

"Uncaught TypeError: Cannot read property 'PlacesService' of undefined "

I still suspect the Google Places API isn't getting loaded properly.

Any clues?


Google Places API

Posted: Wed Aug 06, 2014 7:54 pm
by Evgene Karachevtsev

Hello Gino,

Could you send us public link to your application and steps how to reproduce the issue: http://docs.appery.io/documentation/s...