Google maps - parameters?

(6 posts) (2 voices)


No tags yet.

  1. cookeg, Member

    Hi guys,

    Is it possible to pass an address to google maps via a variable before the report runs. What I have is a list of outlets on the map. I wish to put the customer location in have the map go to the location. As I zoom out it will then show me the closest outlet.
    It does not matter what format is required to be entered as there are only a couple of users that will be answering queries.


  2. myDBR Team, Key Master

    What do you mean with "pass variable before the report runs"? Could you please elaborate.

    Basically you wish to put outlets and customer on the map. You could put outlets (with own icon/picture) and customer location (with it's own icon/picture) at same query and have the map begin centered at customer location with desired zoom level. All this is possible now.

    myDBR Team

  3. cookeg, Member

    Sorry I was not very clear.
    Basically I am populating the map with our outlets. This works fine and flags are appropriately coloured etc. What I would like to do is enter a customer address, received via a phone call, and have the map start, zoomed into that address. As the address will be unknown before receiving a phone call, and not stored anywhere, I was attempting to enter it as a parameter to the report. I either get an error or no result returned from the map.

    ie vCustomer is entered into the prompt as '36+new+street+ringwood+victoria+australia'

    I have played around with several different things but have been unable to get a result.


  4. cookeg, Member

    Sorry didn't notice seen below

  5. cookeg, Member

    "SELECT vCustomer, 'Customer', 'green'"

  6. myDBR Team, Key Master

    You should be just fine when entering the user's location as a parameter. Simply join the parameter with the query for outlet locations using union statement.

    CREATE PROCEDURE  sp_DBR_CustomerLocation( vCustomer varchar(60) )
    BEGIN select 'dbr.googlemaps', 'address'; select vCustomer, 'Customer', 'green'
    select OutletAddress, Outlet_Name, 'red'
    from Outlets; END;

    Google Maps is quite flexible with the address notation so simply entering '36 new street ringwood victoria australia' should be fine.

    myDBR Team


You must log in to post.