Venkate Natesan
Posts: 0
Joined: Thu Oct 24, 2013 5:09 am

Google Places API

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

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Google Places API

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

Venkate Natesan
Posts: 0
Joined: Thu Oct 24, 2013 5:09 am

Google Places API

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

Gino Borland
Posts: 0
Joined: Sat Jun 28, 2014 1:10 am

Google Places API

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.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Google Places API

Hi Gino,

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

Gino Borland
Posts: 0
Joined: Sat Jun 28, 2014 1:10 am

Google Places API

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

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Google Places API

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...

Gino Borland
Posts: 0
Joined: Sat Jun 28, 2014 1:10 am

Google Places API

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?

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Google Places API

Hello Gino,

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

Return to “Issues”