Cfmap 2016 Google api

Explorer ,
Sep 18, 2018 Sep 18, 2018

Copy link to clipboard

Copied

Is anyone experiencing any non-display issues with coldfusion maps/Google map API?

I am using coldfusion 2016 on a windows 10 laptop. My maps are not showing up in real time on my PC or on my smart phone Whenever I make it live. It is showing up fine on my PC in the development mode.

What I am trying to accomplish is to dynamically produce map markers based on the address of our club members. Could I be missing something?  Or is there an easier alternative to Google maps that I can dynamically produce the same results using another map provider?

My application.cfc page

<cfset this.googlemapkey="AIzaSyDy_iL-h-2CxckkV4dh-agNjbMLHFHu0pQ">

On my locations.cfm page

<cfmap name="fruit" height="300" width="1200" centeraddress="714 W. Main st. Richmond, va 23219">

  <cfmapitem name="my_address" markercolor="cccccc" address="511 W. Marshall St. Richmond, Va 23220">

<cfif #session.user_id# EQ "#scois_verify.scois#">

Google Maps

<cfmap name="Fruit Map" height="600" markercolor="db0f0f" width="900" scrollwheelzoom="true" zoomlevel="11" centerAddress="410 E. Main Street, Richmond, VA 23219" tip="Base 1">

<cfloop query="coicontact">

<cfif #coicontact.schoollt# EQ "1">

        <cfmapitem name="#coicontact.clubmember#" markercolor="b24e01" address="#coicontact.home#" showmarkerwindow="true" tip="#coicontact.clubmember#" />

  <cfelseif #coicontact.schoollt# EQ "2"><cfmapitem name="#coicontact.clubmember#" markercolor="f29a57" address="#coicontact.home#" showmarkerwindow="true" tip="#coicontact.clubmember#" />

  <cfelseif #coicontact.schoollt# EQ "3"><cfmapitem name="#coicontact.clubmember#" markercolor="f4dc7a" address="#coicontact.home#" showmarkerwindow="true" tip="#coicontact.clubmember#" />

        <cfelse><cfmapitem name="#coicontact.clubmember#" markercolor="0f1cdb" address="#coicontact.home#" showmarkerwindow="true" tip="#coicontact.clubmember#" /></cfif>

</cfloop>

</cfmap><cfelse></cfif>

Views

228

Likes

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
LEGEND ,
Sep 18, 2018 Sep 18, 2018

Copy link to clipboard

Copied

I tried using CFMAP in CF11 and never could get it to work.

It's not easier doing it in JavaScript, but it will work.  Do it in JavaScript.  Apparently, the Node.js that Adobe is using for CF is old/outdated.

V/r,

^ _ ^

Likes

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
Engaged ,
Sep 19, 2018 Sep 19, 2018

Copy link to clipboard

Copied

LATEST

I agree with WolfShade​... use the javascript libraries from the map providers.  You'll get better results, more features and the JS/CSS libraries used will be up-to-date.

Google recently started charging for their map API and our first bill was rather large, so we checked out MapBox & Here.  I had never used the blackbox CFMap (or any other CFUI) tag as I thought it was too restrictive. I wrote my own "CF_Map" customtag that uses many of the same basic parameters and additionally works with MapBox & HERE as alternate back-end mapping services.  (I'm considering adding support for Leaflet & OpenLayers too.)

Likes

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