• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Coldfusion + Google Maps API

New Here ,
May 22, 2009 May 22, 2009

Copy link to clipboard

Copied

I realize this is less of a coldfusion question and more of a google api question but I figured you guys would know more about the integration within coldfusion than others.  I am using the coldfusion/google maps tutorial available here: http://tutorial397.easycfm.com/

I am using the "multiple markers" part.  So I have a query that pulls all of the Long and Lat information and it displays it in the map perfectly.  It is fully functional with the exception the map does not automatically zoom and center so all of the points are visible.  I am currently manually inputing a zoom level and long, lat to center.  Does anyone here have experience with automatically centering and zooming dynamic data in google maps api.  I have searched the internet endlessly and have been unable to find a tutorial or peice of code that 'actually' works with the code I am using.

Thanks in advance,

Mark

TOPICS
Advanced techniques

Views

1.4K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 25, 2009 May 25, 2009

Copy link to clipboard

Copied

Didn't this code work?

map.centerAndZoom(new GPoint(<cfoutput>#mylng#, #mylat#</cfoutput>), 3);

-- Prasanth

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 26, 2009 May 26, 2009

Copy link to clipboard

Copied

LATEST

The long and lat variables are retrieved off of one single variable #myzipvar#.  Seeing as how the map will sometimes have things in multiple zip codes, and the need to automatically center and zoom appropriately, that code you copied and pasted only serves to provide a center/zoom based on a zip code.  Is there a way I can take the lat and long of each point and formulate something that automatically centers it and zooms.

Any ideas?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation