Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <div id="mapDiv"></div>
              
            
!

CSS

              
                #mapDiv {
  height:100%;
  width:100%;
  position:absolute;
  left:0;
  top:0;
  right:0;
  bottom:0;
}
              
            
!

JS

              
                var cMap;
var mapCfg = '<mapView createdBy="name:cMapsAnalyticsDesigner;version:4.0" createdOn="12/10/2016"><viewName>My View</viewName><viewDescription></viewDescription><tags></tags><templateVersion></templateVersion><key>enter_your_own_key_d8d37yxn</key><googlePremierKey></googlePremierKey><sslEnabled>true</sslEnabled><baseMapTileUrl></baseMapTileUrl><baseMapTileCfg></baseMapTileCfg><useGoogleBase>true</useGoogleBase><useMapboxBase>false</useMapboxBase><useHereBase>false</useHereBase><useCartoBase>false</useCartoBase><useEsriBase>false</useEsriBase><dynamicZoomEnabled>true</dynamicZoomEnabled><currentLocationOnLoadDisabled>true</currentLocationOnLoadDisabled><panCoords></panCoords><zoomLevel></zoomLevel><dynamicZoomOnShapeSelect>false</dynamicZoomOnShapeSelect><dynamicZoomOnClusterSelect>false</dynamicZoomOnClusterSelect><dynamicZoomOnPointSelect>true</dynamicZoomOnPointSelect><showBreadcrumbsOnDrill>true</showBreadcrumbsOnDrill><dynamicZoomOnDrill>true</dynamicZoomOnDrill><multiSelectEnabled>false</multiSelectEnabled><adhocPanelVisibility>false</adhocPanelVisibility><radiusMeasureUnit>km</radiusMeasureUnit><indoorEnabled>true</indoorEnabled><useAdvancedInfowindow>true</useAdvancedInfowindow><showSearchBarWhenAIWHidden>true</showSearchBarWhenAIWHidden><showAIWOnLoad>true</showAIWOnLoad><showAIWOnLocSelect>true</showAIWOnLocSelect><includeAdvancedInfWinSummaryCard>false</includeAdvancedInfWinSummaryCard><includeAdvancedInfWinFilterCard>true</includeAdvancedInfWinFilterCard><includeAdvancedInfWinRankCard>false</includeAdvancedInfWinRankCard><includeAdvancedInfWinTimeCard>true</includeAdvancedInfWinTimeCard><includeAdvancedInfWinSearchCard>true</includeAdvancedInfWinSearchCard><includeAdvancedInfWinSearchPlacesCard>false</includeAdvancedInfWinSearchPlacesCard><includeAdvancedInfWinExportCard>false</includeAdvancedInfWinExportCard><includeAdvancedInfWinDriveCard>false</includeAdvancedInfWinDriveCard><includeAdvancedInfWinDrivePolysCard>false</includeAdvancedInfWinDrivePolysCard><includeAdvancedInfWinDrillCard>false</includeAdvancedInfWinDrillCard><includeAdvancedInfWinSelectCard>false</includeAdvancedInfWinSelectCard><includeAdvancedInfWinStreetViewCard>false</includeAdvancedInfWinStreetViewCard><includeAdvancedInfWinCustomCard>false</includeAdvancedInfWinCustomCard><advancedInfoWindowJsonCfg></advancedInfoWindowJsonCfg><infoWindowFontFamily>Arial</infoWindowFontFamily><infoWindowFontSize>12</infoWindowFontSize><infoWindowFontColor>000000</infoWindowFontColor><infoWindowFontAlign>left</infoWindowFontAlign><infoWindowUseBoldFont>false</infoWindowUseBoldFont><infoWindowFontUnderlineEnabled>false</infoWindowFontUnderlineEnabled><infWinItalicFontEnabled>false</infWinItalicFontEnabled><infoWindowVisibility>true</infoWindowVisibility><infoWindowValueVisibility>true</infoWindowValueVisibility><infoWindowLayerNameVisibility>true</infoWindowLayerNameVisibility><glowVisibility>true</glowVisibility><glowColor>0000ff</glowColor><baseMapImageryStyleType>styleTypeRoadmap</baseMapImageryStyleType><enablePoiInteractivity>true</enablePoiInteractivity><showTrafficLayer>false</showTrafficLayer><showTransitLayer>false</showTransitLayer><showBikelayer>false</showBikelayer><legendVisibility>false</legendVisibility><clusterToggleControlVisibility>false</clusterToggleControlVisibility><navigationControlVisibility>true</navigationControlVisibility><currentLocationControlVisibility>false</currentLocationControlVisibility><mapReady>true</mapReady><layerSelected>false</layerSelected><zoomChanged>false</zoomChanged><centerChanged>false</centerChanged><reverseGeocodeResponse>false</reverseGeocodeResponse><latLngToReverseGeocode></latLngToReverseGeocode><geocodeResponse>false</geocodeResponse><addressToGeocode></addressToGeocode><visible>true</visible><indoorMapVisibility>false</indoorMapVisibility><showPinsForIndoorMapLocations>false</showPinsForIndoorMapLocations><directionPanelVisibility>false</directionPanelVisibility><directionWaypoints></directionWaypoints><currentLocation>false</currentLocation><useFreeApi>false</useFreeApi><layers><layer><name>My Layer</name><description></description><type>points</type><sankeyJsonData></sankeyJsonData><cartoDBJsonVizURL></cartoDBJsonVizURL><cartoDBSubLayerId>null</cartoDBSubLayerId><cartoDBUser></cartoDBUser><cartoDBSqlQuery></cartoDBSqlQuery><cartoDBMeasFieldName>null</cartoDBMeasFieldName><cartoDBDrillColName>null</cartoDBDrillColName><cartoDBTorqueJsonVizURL></cartoDBTorqueJsonVizURL><cartoDBUsername></cartoDBUsername><cartoDBMapName></cartoDBMapName><cartoDBAuthKey></cartoDBAuthKey><cartoDBMapLayerName></cartoDBMapLayerName><cartoDBMapLayerInteractivity></cartoDBMapLayerInteractivity><cartoDBMapLayerTorqueCSS></cartoDBMapLayerTorqueCSS><useLayerSpecificApiInfWins>true</useLayerSpecificApiInfWins><useLayerSpecificApiTooltips>true</useLayerSpecificApiTooltips><cartoDBMapLayerUseHttps>true</cartoDBMapLayerUseHttps><indoorMapUrl></indoorMapUrl><bufferDependentLayer>none</bufferDependentLayer><bufferDistUnit>meters</bufferDistUnit><bufferPlacement>back</bufferPlacement><shapeFileType>customUrl</shapeFileType><shapeFileUrl></shapeFileUrl><shapeGeocoderLevel>uszips</shapeGeocoderLevel><dataKeysUrl></dataKeysUrl><dataSourceType>statictsv</dataSourceType><dataSource><![CDATA[37.7693911,-122.4290072	Dr. Goldstein	50	8/9/2016\r\n \
37.790998,-122.431254	Dr. Pinenuts	11	11/13/2016\r\n \
37.7480245,-122.4208806	Dr. Smith	12	8/2/2016\r\n \
37.789675,-122.417049	Dr. Jones	14	7/23/2016\r\n \
37.7565985,-122.4045723	Dr. Roger	15	2/19/2016\r\n \
37.7956765,-122.4092976	Dr. Rasheed	16	2/2/2016\r\n \
37.7630855,-122.4578733	Dr. Dongle	17	7/5/2016\r\n \
37.7739893,-122.4544912	Dr. Douglus	18	10/25/2016\r\n \
37.7473074,-122.4592076	Dr. Favre	19	6/18/2016\r\n \
37.780416,-122.403231	Dr. Oliver	10	4/4/2016\r\n \
37.779602,-122.402201	Dr. Alexander	12	6/8/2016\r\n \
37.778856,-122.402201	Dr. Mueller	5	12/6/2016\r\n \
37.778042,-122.402458	Dr. Buckley	11	1/16/2016\r\n \
37.777567,-122.404518	Dr. Koch	7	11/19/2016\r\n \
37.778585,-122.404776	Dr. Gallagher	19	11/24/2016\r\n \
37.779806,-122.40469	Dr. Mckinney	2	7/14/2016\r\n \
37.781027,-122.405291	Dr. Lucero	19	3/22/2016\r\n \
37.779399,-122.406921	Dr. Henderson	5	5/15/2016\r\n \
37.777024,-122.406149	Dr. Brennan	7	10/10/2016\r\n \
37.777296,-122.40881	Dr. Perez	3	8/1/2016\r\n \
37.77967,-122.408209	Dr. Harvey	7	2/25/2016\r\n \
37.775803,-122.412329	Dr. Sutton	2	3/21/2016\r\n \
37.779941,-122.428637	Dr. Shea	12	3/18/2016\r\n \
37.779059,-122.429066	Dr. Preston	6	6/11/2016\r\n \
37.777228,-122.425289	Dr. Rich	12	5/22/2016\r\n \
37.777228,-122.419796	Dr. Delgado	10	6/2/2016\r\n \
37.780959,-122.418165	Dr. Dalton	12	8/24/2016\r\n \
37.780348,-122.416706	Dr. Villanueva	20	12/19/2016\r\n \
37.782926,-122.414217	Dr. Merritt	19	11/24/2016\r\n \
37.784893,-122.41353	Dr. Galloway	2	11/18/2016\r\n \
37.787742,-122.424946	Dr. Russell	5	8/31/2016\r\n \
37.789438,-122.417908	Dr. Holmes	12	6/21/2016\r\n \
37.788488,-122.411299	Dr. Daniel	19	3/14/2016\r\n \
37.79249,-122.40941	Dr. Donovan	11	8/19/2016]]></dataSource><esriMapServerURL></esriMapServerURL><dataSourceColumnDefs>[{"dataField":"dsLocationColumn","fieldDisplayName":"","colPosition":0},{"dataField":"dsLabelColumn","fieldDisplayName":"","colPosition":1},{"dataField":"dsValueColumn","fieldDisplayName":"","colPosition":2},{"dataField":"dsTimeColumn","fieldDisplayName":"","colPosition":3},{"dataField":"dsCategoryColumn","fieldDisplayName":"","colPosition":4},{"dataField":"dsDrillIdColumn","fieldDisplayName":"","colPosition":5},{"dataField":"dsTimeColumn","fieldDisplayName":"","colPosition":6}]</dataSourceColumnDefs><transparency>100</transparency><enabled>true</enabled><iconSize>20</iconSize><iconType>pin</iconType><clusterStyle>disabled</clusterStyle><dynamicSizeEnabled>false</dynamicSizeEnabled><useLogScale>false</useLogScale><visibility>true</visibility><minZoomVis>1</minZoomVis><maxZoomVis>23</maxZoomVis><drillLevel></drillLevel><drillEventTrigger>none</drillEventTrigger><drillParent>none</drillParent><drillVisibilityOverride>false</drillVisibilityOverride><useCurrentLocationAsStartPoint>false</useCurrentLocationAsStartPoint><travelMode>Driving</travelMode><travelUnits>IMPERIAL</travelUnits><markerLayerBindings></markerLayerBindings><useCacheDriveTimePolyService>on</useCacheDriveTimePolyService><wmsURL></wmsURL><wmsStyleString></wmsStyleString><wmsLayerString></wmsLayerString><layerColor>1b8dce</layerColor><alerts><alertIcons>pin,pin</alertIcons><alertType>type-none</alertType><alertValues>50,100</alertValues><numAlertLevels>2</numAlertLevels><alertHeatmapVals>50,100</alertHeatmapVals><alertDefinition>high-values-good</alertDefinition><alertColors>c0c0c0,008800</alertColors></alerts></layer></layers></mapView>';

function buildMap(){
  cMap = new centigon.locationIntelligence.MapView();
  cMap.parseConfigXml(mapCfg);
};

//WHEN DOCUMENT LOADED INITIALIZE THE MAP
$(document).ready(function(){
// CALL THE FUNCTION
buildMap();
});
              
            
!
999px

Console